How to stay perpendicular with a terrain or terrain mesh

Dear all,

I have a "motocycle" system which descending slope with 1 front and 1 read wheel collider.

i added a rigidbody to this system with the rotation freezed (freezeRotation = true) -> to avoid unwanted physics behaviour during the downhill.

I would like to know how can i keep my "moto system" always perpendicular with the ground (terrain or terrain meshes).

Thanks for your help,


If I'm correct you're making a game along the lines of Trials HD; 3D graphics but you only ride along a 2D plane?

Add a Configurable Joint component to the object with the Rigidbody (the bike). In the parameters set the following options:

ZMotion = Locked

Angular XMotion = Locked

Angular YMotion = Locked

Configured in world space = Yes