Rigging Wheel :(


#1

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!


#2

And you thought that those maths classes would never be of use :wink:

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.


#3

Thanks DMack!!

I miss to this class of math :smiley:

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

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

Regards <-


#4

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?


#5

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.


#6

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


#7

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.


#8

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…


#9

Here’s a LW rig… http://www.onthez.com/temphosting/vehicle_setup.zip

Might help.


#10

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.