View Full Version : Combine Rotation and Movement

daagom

15-11-2003, 11:10 AM

I am trying to write an expression that makes the wheels of an object rotate based on how much the object is moved. It seems easy but I'm having a lot of trouble figureing it out.

basically:

if car moves 5 units, wheels rotate 25 degrees on X.

Thanks,

-Jeremiah

oh... 3D studio max 5.1

CorrinWyndryder

21-02-2005, 05:13 AM

The answer is in trig.

The radius of your wheel is r

Distance traveled is d

And pi = 3.14159.....

A revolution is 2pi Radians

A radian is the length of an arc on the circumference of a wheel equil to that wheel's radius.

The forumla for converting radians to degrees is:

x radians (180 degrees/pi radians) = y degrees

where x is the radians you travel and y is the value of x in degrees.

eg:

2pi (180/pi)

360pi/pi

360

2pi radians = 360 degrees

--------------

So if your wheel's moving 5 units, what's the radius of your wheel?

If the radius is "r" then here's your equation

(5/r)(180/pi) = the degrees you need to rotate your car.

My problem is applying it to maxscript. That I still need work on.

vBulletin® v3.8.10, Copyright ©2000-2019, vBulletin Solutions, Inc.