proper Wheel Rig

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  02 February 2012
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?
  02 February 2012
Alternatively, is there a way to acces the LOCAL x Axis?
  02 February 2012
I would suggest using a script controller and not a paramWire.
Paul Neale
  02 February 2012
Originally Posted by PEN: I would suggest using a script controller and not a paramWire.

I get the same error message there as well :(
  02 February 2012
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.
Paul Neale
  02 February 2012
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 12:15 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.