- Home /
Physics in 2D mode not working?
I have a ball that I want to simulate with 2D physics to bounce around when dropped, but I have a problem. If i just add a rigidbody2D to the sprite it just starts to float up. If I try to add any force using rigidbody2D.AddForce()
it moves fast for one frame then starts to slowly drift upwards again. Yes i have checked the Y-axis and it is pointing up. Here is the code for adding force.
if(Input.GetMouseButtonDown(0))
{
Vector2 force = ((Vector2.right + Vector2.up).normalized * m_force_thrown);
Debug.Log(force);
transform.rigidbody2D.AddForce(force);
}
Any Idea what is going on, or how I can make it act naturally?
Your answer
Follow this Question
Related Questions
add force to object that has 2 different rigid bodies 0 Answers
Rigidbody.velocity seems to be breaking jumping physics 0 Answers
How to make rigidbodies on each side of a cube fall towards the cube? [multiple gravity / addForce] 0 Answers
Setting a RigidBody's velocity messes with my custom gravity, not sure how to proceed. 0 Answers
How to re-center a Rigidbody isKinematic object after adding force to it? 2 Answers