>: CG Forums on 3dtotal - The best forums for CG artists :.
threedy forums home
 


top-table-gradient
Go Back   3DTotal Forums > Archives > Archives > Scripting & coding
bottom-table-gradient

Reply
 
Thread Tools Display Modes
Old 15-11-2003, 10:10 AM   #1
daagom
Registered User
 
Join Date: Mar 2003
Location: San Francisco
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to daagom
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.

basically:

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

Thanks,
-Jeremiah

oh... 3D studio max 5.1
__________________
http://www.jeremiahgrant.com
daagom is offline   Reply With Quote
Old 21-02-2005, 04:13 AM   #2
CorrinWyndryder
Registered User
 
Join Date: Feb 2005
Posts: 6
Thanks: 0
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.

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.
CorrinWyndryder is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 12:58 PM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
all images displayed on this site are copyright the original artists and may not be reproduced, copied or published elsewhere without their express permission