Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.