- Home /
rigidbody2d does not follow physical rules
Hi Guys,
I´ll facing a problem, which I can´t handle since days (I am a beginner in Unity). What I managed and was working to draw a line and adding an EdgeCollider2D with script. (It´s working fine (as soon the ball hit´s the line it´s moving it´s direction)).
Now I wanted the line to fall down (some kind of gravity). I did this with adding an Rigidbody2D.
So and this is my problem: The line falls down and hit´s the ground (my ground is for example a BoxCollider2D). As soon it hits the ground it´s moving around with no physical rules (look´s like it´s dancing ). Sometimes it´s just thrown through the screen. I want the line to stay on the ground.
For example: if I draw a triangle it should fall down to the boxCollider2D and should simply stay on the ground (currently it´s slightly moving in the x-axis) (see picture)
Does anybody know what´s my fault, or what to do?
Thanks in advance. Tobi.
Do I have to calculate a balance point and place a force on it? How to calculate such balance points?
Is this maybe the needed function-->Rigidbody2D.centerOf$$anonymous$$ass?
Your answer
![](https://koobas.hobune.stream/wayback/20220612075054im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
OnTriggerEnter2D fires multiple times when Animator component is on 3 Answers
Unity 2d > Player sprite jerks on x axis with no force applied 1 Answer
How to Maintain Constant Velocity of a Moving GameObject? 0 Answers
(2D) Can't use colliders when I have a kinematic rigidbody? 1 Answer
Can I make mass and density constant independent of Collider 2D size? 1 Answer