daagom
12-07-2004, 11:58 PM
hey folks....heres some helpful code
wheel.rotateZ = (body.translateX / (2*3.14*1)) * -360;
or
wheel.rotateZ = (body.translateX * 180) / (1 * 3.14);
where 1 = the current radius, 3.14 = pi (duh).
its written in MEL syntax... but it can be applied to any package I'm sure.
it rotates wheels according to the distance moved
***post other cool code in this thread. Cool code is always useful
wheel.rotateZ = (body.translateX / (2*3.14*1)) * -360;
or
wheel.rotateZ = (body.translateX * 180) / (1 * 3.14);
where 1 = the current radius, 3.14 = pi (duh).
its written in MEL syntax... but it can be applied to any package I'm sure.
it rotates wheels according to the distance moved
***post other cool code in this thread. Cool code is always useful