0
\$\begingroup\$

I'm pretty new to Unity3D game engine and game development, so don't judge me strictly. I import a model of the rail track, add rigid body component (with mass 1 and use gravity flag) and box collider component. Then I add train engine with rigid body (mass == 1, use gravity) and box collider and put it on the track. When I'm running simulation, train engine starts jumping like a ball (despite material for tracks and train is Metal (built-in Unity material)).

There is an important note that rail tracks are fixed (freeze position set in rigid body options). It seems to be natural. Anyway, if I turn off freeze position option then train engine does not jump, but tracks fly apart.

So I'm in trouble here. Can you please suggest what is the problem?

Thanks in advance.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

First, if you've set freeze position on the rail tracks, why do you have them set to react to gravity?

Second, make sure that your train and tracks are not positioned so that they are initially colliding. The way you can do this is to keep moving the train up until it simply falls to the tracks.

Third, I'm not sure that metal is the material that you want here. I would suggest making your own physics material and experimenting with the properties. In general, your objects should have a very high coefficient of static friction, and a not so high coefficient of dynamic friction. Play around with the settings to see what feels right.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .