Alex Morris
01-19-2007, 12:25 PM
Hi guys,
I'm exploring vehicle rigging and am having problems with a script controller for keeping the wheel (a cylinder) on the ground (a plane with noise applied). I've created 2 variables within the script controller dialogue : g and w and assigned them to the 2 object nodes.
The expression is:
r = ray w.pos [0,0,-1]
c = (intersectRay g r)
c.pos + [0,0,(w.radius)]
this throws a ray out straight down from the wheel, calculates the intersection position and then shifts the wheel to sit on the ground. The scripted version of the code works fine on a single frame, but i keep getting dependency errors with the expression and I'm not sure why.
Any ideas? (not used expressions before so assume I know nothing!)
I'm exploring vehicle rigging and am having problems with a script controller for keeping the wheel (a cylinder) on the ground (a plane with noise applied). I've created 2 variables within the script controller dialogue : g and w and assigned them to the 2 object nodes.
The expression is:
r = ray w.pos [0,0,-1]
c = (intersectRay g r)
c.pos + [0,0,(w.radius)]
this throws a ray out straight down from the wheel, calculates the intersection position and then shifts the wheel to sit on the ground. The scripted version of the code works fine on a single frame, but i keep getting dependency errors with the expression and I'm not sure why.
Any ideas? (not used expressions before so assume I know nothing!)
