PDA

View Full Version : Rotation Expression Help


Leo73
02-06-2003, 12:41 PM
I could really use some help on this one. I want to setup an expression that controls the rotation of one dummy. I have main dummy and then the rotation dummy with a postion constraint on it to keep its relative position. What I cant figure out is the exact formula to use. I know it has to do with 2 * pi * r, but this is the part where i get lost.

Any help would be appreciated as the tutorials that I have checked yielded no solutions.

pluMmet
02-06-2003, 11:43 PM
the formula is something like
(Z_Rotation/360)*(2*3.14*Distance)*100

Distance=distance from object to pivot and the last 100 has to do with Max units (take it of if nessecary)

Though I don't know if this will help you as I cant tell what your saying...

g/l

Leo73
02-07-2003, 03:18 PM
What i have is a tank setup. The main dummy controls the movement of the tank with the tracks set with a float expression on their percent to control how far they move in relation to the distance the main dummy travesl. Now I want to do the same thing is the road wheels except that i want the road wheels to rotate based on how far the main dummy moves. So the far you move the main dummy the more the road wheels rotate.

Does this clear it up at all? I understand the formula; so would i substitute (TankMove)(which is the dummy that is constrained to the y-axis) for distance in the formula?

Thanks for the help thus far

Leo73
02-07-2003, 03:57 PM
Here's a pic of the problem. You can see the red dummy that controls the over all tank. Then there are dummies for each road wheel. What I want to happen is that when the main dummy moves along its y-axis (forward and backward) then I want the road wheels dummies to rotate the correct number of times in accordance with the distance that the main dummy travels.

Does this make it better now.

Thanks for the help

pluMmet
02-07-2003, 04:24 PM
the weels should turn based on how much ground they would turn as if they were on it...

the formula I gave you works... here's a file that you can refer to.
http://members.cox.net/plummet/CGTalkHelp.max hope you have R5.1...


the only thing that is required is the radius of the wheels that turn the tread....that's the distance part of the equation that I told you.

here's the equation for a cylinder with a radius of 10 from the file I posted for you X_Position*(360/(2*3.14*10))/100

it's only slightly variations but you should get the idea that it's always the same (*or/)360(*or/)2*3.14*distance(*or/)100

let us know how it goes:beer:

Leo73
02-07-2003, 05:23 PM
Thanks. That worked. I knew that I would have to either do an expression or a float wire, I just wasnt sure about the formula.

Thanks again for the help

CGTalk Moderation
01-14-2006, 08:00 AM
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.