PDA

View Full Version : Rigging Wheel :(


timnhe
04-07-2006, 09:58 AM
I´m sure that it´s the most simple question in the world, but ... How can I make the automatic spin of a tyre?

Thanks!

DMack
04-07-2006, 11:05 AM
And you thought that those maths classes would never be of use ;)

Circumfrence of a circle (tyre) is pi*diameter.

So as your vehicle moves forward, you want the same distance covered across the ground as around the tyre......make sense?.....So make a basic expression that will rotate your wheel one whole revolution for every pi*the diameter of your wheel that your vehicle moves forward.

Hope that helps.

timnhe
04-07-2006, 11:33 AM
Thanks DMack!!

I miss to this class of math :D

I think that the final expression (in my case 2 variables) is :

-> Diameter : wheel_diameter * pi
-> spin: (360 * [object_motion:zpos]) / Diameter :beer:

Regards <-

monovich
04-11-2006, 08:37 AM
would this script rotate the wheel based on z position only?

what if the car is moving in a curved line or a diagonal line?

stooch
04-11-2006, 02:52 PM
then you would need to calculate point on curve distance... curve being described by the keys XYZ. Technically you should be able to figure out the distances between keys with some degree of accuracy and then apply the distance moved during each keyframe to a rotation modifier.

ill see if i can figure out the expression for this.

WesComan
04-11-2006, 03:12 PM
would this script rotate the wheel based on z position only?

what if the car is moving in a curved line or a diagonal line?

You could use the PathSoFar expression. Note that this uses the keyframed info so it won't update 'realtime' as with most other expressions.

stooch
04-11-2006, 03:42 PM
thats what ive been trying to use. im using the following expression

abs (PathSegment(Torus,NOW,NOW-1) * 19)

problem is that it spins the object back and forth depending on the direction of the curve, im trying to make it absolute and adding the difference to pitch but it just moves back and forth slightly. the * 19 is just to get a bigger value.

DMack
04-11-2006, 03:51 PM
How about some good old sin and cos of x and y moved? You could always work out the distance then and then just sample it on a really small time segment - I think you can do so on less than a frame....

dobermunk
04-11-2006, 04:48 PM
Here's a LW rig... http://www.onthez.com/temphosting/vehicle_setup.zip

Might help.

CGTalk Moderation
04-11-2006, 04:48 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.