How to make a track vehicle, or add a position constraint on a local axis?‏

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By BZ_vip

Hello there!

I am trying to create a physicalized vehicle.
Instead of using simple wheels, I want to use tracks (like a tank or an excavator).

What I did :
I began by using 1 rigidbody for each “plate” of the tracks, and several hingeJoint between them.
This works great.
Then I added 2 wheels inside the tracks.
And I added a chassis, to which the 2 wheels are attached each by a pinjoint.
This works great too, but there is a caveat.

Now I have 1 problem :
After a few meters, the track, which is not attached to the wheels at all, begins to slide outside of them.

I tried using Linear constraints with 6DOFJoint, but even with 2 rigidbodies, it does not seem to work realistically.

How to avoid that the tracks slide outside the wheels ?

Best regards !