- Home /
Problems with gravity: jumping models
Hi all.
I'm pretty new to Unity 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, user 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.
also try unityGE$$anonymous$$S.com for many outstanding beginner articles on these topics
Answer by Fattie · Mar 17, 2013 at 11:58 AM
I'm thinking the TRACKS should NOT HAVE a rigidbody ... in fact you just want a COLLIDER on the tracks.
TRACKS == collider, NO rigidbody
TRAIN CARS == collider + rigidbody + gravity
Does it help?
Regarding freezing (this is on the Cars). Turn it all off (unchecked) at first. Possibly you want to freeze the Z value, but don't worry about it at first, it should work anyway.
Your answer
Follow this Question
Related Questions
Why is there no gravitational acceleration with Unity 4.3.1 2D? 0 Answers
A node in a childnode? 1 Answer
Gravity Is Slow But Unit Scale Is 1.0 1 Answer
Error in scripting with Physics.Raycast 0 Answers
Movement on a tube 1 Answer