No tags yet.
I'm currently in a bit of a pickle. I'm trying to rig up a steering system for a car so it can be animated along a motion path and the front steering wheels will point in the right direction.
At the moment for simplicity I've got 4 wheels parented to a locator which is positioned at the centre of the back axle. The locator is then attached to a motion curve which is a circle. The locator stays nice and parallell with the motion path, the big problem is if I try and use that rotation (rotation Y) to drive the steering orientation, it continues to increase to 360 dgrees, so the front wheels will just continue to spin on their own axis as the whole thing completes a lap of the circular motion path.
I'm looking into figuring it out using directional vectors (length = sqrt(x*x + y*y), then using acos(y/xyLength)). Is there a much simpler more obvious way that i'm too daft to see??Is it something to do with its relative rotation as opposed to its worldspace rotation??
Been looking into it overnight - seems like it has something to do with the Ackermann Angle. This determines the angle the wheel rotates in the Y axis (up axis) - and explains that they do not remain parallel to avoid any skidding around corners. makes sense because the inner wheel's radius will be smaller than the outer wheels radius.
If you have a meandering curve for a motion path, would it be possible to query the radius of a bend at any given point on that curve? Assuming this is possible, it would then be a case of using a bit of trig to get the two front wheels turning rotation.
Yeah, I'm sure there are a few way to go about doing it. I haven't looked to closely at our car setups. I know we do a lot of aims and stuff to keep things in a path but be able to get off it.
I haven't looked at all at how we get our wheels to spin properly though. But I think you are in the right track
no pun intended...
Yeah i've tried using aim constraints with little success - the way i'm looking at it is as follows:
1. Set the motion path pivot point at the centre wheel axis.
2. Establish the length of the wheelbase.
3. Use arclen to get the length of the motion path and claculate the wheelbase percentage.
4. This gives the parameter position of the front wheel base in relation to the back (frntPos = mtnPth.Pivot + wheelbase percentage) on that particular motion path
5. Then its a case of querying the the position of the front wheel base...
This is where i'm up to now, looking through the MEL help. There's a number of arguments on the pointoncurve cmd that'll return position and tengency etc, so its getting the right one. Am I right in saying using the eval command in an expression allows you to use MEL?
You must log in to post.