proper Wheel Rig


Hi Guys,

i worked my self through this tutorial and this addition.
In there, they basically tell you how you can set up the rotation of the wheel depending on the movement of the master control.
However, I struggle to set up the second part with the direction vector. The calculating snippet of the guy looks like this:

  local posIncrement = 0.0 as float
   posIncrement = length((master.pos - (at time (currentTime-1) master.pos)) * master.transform.row2)
   rotation = (posIncrement+storedDistance)/(wheelRadius)

so how do I get the posIncrement Calculation into the parameter wiring?
I only got that far to take the normal X_Position and divide it by the radius from a spline circle (which I use as dummy to define the radius of the wheels. so the rig gets more reusable)


However, if I try to add the calculation to the wire parameter, I get the following error: “Incompatible types: 0.0, and undefined”

My obviously wrong code looks like that:

 local posIncrement = 0.0 as float
 posIncrement = length(($car_master_rig.pos - (at time (currentTime-1) $car_master_rig.pos)) * $car_master_rig.transform.row2)

Any suggestions?


Alternatively, is there a way to acces the LOCAL x Axis?


I would suggest using a script controller and not a paramWire.


I get the same error message there as well :frowning:


I’m not really sure what you are asking. You say “how do I get it into a parameter wire” use a script controller, set up variables in the left hand panel, attach those variables to tracks of animation or nodes and then use them in your expression.

Post an example max file if you are still having troubles with a full explanation of how to use it, the error and what you expect.


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.