View Full Version : car tire spinning
marvin042 03152003, 08:50 PM Okay, I'm moderate at maya, but my MEL is not good. I've made a car, and the front tires turning are being driven by an EPS curve. What I want to know is if there is a script out there that can control the speed of the tires rotating as I move the car forward. I would accept anything: tutorial, hints, MEL, or whatever.
Thanks.
marvin


Abominable
03152003, 11:32 PM
Check out Gnomon Online...i think they have a vid on what you need and it's a free one if i remember correctly or check out www.lostpencil.com (http://www.lostpencil.com/)
you'll want to link the tire's rotation (in example) in the z axis to the translation in the x axis...
you'll need to get the diameter of that tire, so use a distance tool to find it...
once you got that, open up your handy dandy calculator and the formula for the circumference is " 2*3.14*diameter ". Once you get that number, divide 360 by that number.
so say the diam of the tyre was 4 then the circumference would be 25.13, and 360 / 25.13 = 14.33. So what this means is that for every unit travelled in the x axis, the tyre will rotate 14.33 degrees.
So to get this to work using mel would look something like this..
tyre.rotateZ = tyre.translateX * 14.33;
so what this says is that for every 1 unit travelled in x, the rotate is equal to that times 14.33, so if it went 1 unite, 1 * 14.33 is 14.33 degrees....
hope that helps =)
Norb
marvin042
03162003, 09:47 PM
You both rock. Thank you very much. Norb, you know your math and Maya, and Abominable, those were just what I was looking for.
marvin
Kabab
03172003, 07:18 AM
Originally posted by Norb
you'll want to link the tire's rotation (in example) in the z axis to the translation in the x axis...
you'll need to get the diameter of that tire, so use a distance tool to find it...
once you got that, open up your handy dandy calculator and the formula for the circumference is " 2*3.14*diameter ". Once you get that number, divide 360 by that number.
so say the diam of the tyre was 4 then the circumference would be 25.13, and 360 / 25.13 = 14.33. So what this means is that for every unit travelled in the x axis, the tyre will rotate 14.33 degrees.
So to get this to work using mel would look something like this..
tyre.rotateZ = tyre.translateX * 14.33;
so what this says is that for every 1 unit travelled in x, the rotate is equal to that times 14.33, so if it went 1 unite, 1 * 14.33 is 14.33 degrees....
hope that helps =)
Norb
That works well if you are only moving the object in the X axis if you move it in the Y axis it won't work.
Look at the tutorial on lost pencils site it explains it in detail its a very good tut.
CGTalk Moderation
01142006, 03:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©20002014, Jelsoft Enterprises Ltd.