I'm completely re-wording the same question. Below, there's the original question.
Now the title is pretty self explanatory and it's basically pointed towards iTween and Bob Berkebile:
Can we mix both Path Controlled Character and Working With Physics at same time?
The result should be something similar to what I did in my portfolio (in case the first link ever breaks, this second should have one updated) but except not using any hacks like I did and once it's applied to the character (like it is) it would be applied to every other rigidbody (yes, Lerpz is a rigidbody there).
I misinterpreted your question the first time. I think you want the following:
The XY plane is now a curved surface, not on the groud, but the plane itself. You want objects to follow this curve.
There are two good ways of doing this: take the curve data from a model, or take the data from a spline.
If you are using a mesh, just create a single triangle strip in the shape of the curve, with the faces pointing towards the camera. Use the normal of the triangles in the strip to set the objects positions. Of course, the curve will need to have high resolutions or teh curve will look jagged as the characters move forward. You could interpolate the normals to get a smoother appearance of movement.
if you use a spline, you'll need to know a little about splines first.
is a good way to generate some catmull rom splines. From there, use the forward direction of any point you generate on the spline as the new forward direction of your character. You might want to squash the up vector of each of those points first.
answered Jan 30 '10 at 01:23 AM