Force a rigidbody to move along another one

Hi,

essentially what I mean ia a rollercoaster- we have a rigidbody that can only move along forward or backward on the rollercoaster geometry. In physical terms, of all forces applied to the rigidbody only the component along the rollercoaster geometry are considered while the remaining directions are confined by the geometry. Is there a simple way to implement this?

In the end I would like to take a box and have a sphere slide along one of its principal axes, still computed by the physics engine.

I’m sorry I don’t know of anyway to do this, you could apply an animation to it, then just adjust the animation’s speed. Other than that I don’t know if that’s possible

I’m not completely sure but you may be able to achieve this with joints?

Other than that you will probably have to write some complex algorithms

Not completely sure

Haven’t found a way yet.

Configurable joints let you e.g. fix the moving direction only along the x-axis, but I need a fixed movement along an arbitrary direction…