|15-11-2003, 10:10 AM||#1|
Combine Rotation and Movement
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.
if car moves 5 units, wheels rotate 25 degrees on X.
oh... 3D studio max 5.1
|21-02-2005, 04:13 AM||#2|
Join Date: Feb 2005
Thanked 0 Times in 0 Posts
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.
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.
|Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)|