- Home /
AddForce and Rigidbody 2D - Body doesn't move correct number of units per second?
I have a ratio of 1 Unity unit to 1 pixel set up with my orthographic camera.
Each sprite has a 'Pixels To Units' value of 1 in the Import Settings.
I have attached a Rigidbody 2D component to my sprite and set its mass to 1 and told it to ignore gravity.
I then add a force to the body using AddForce
o.rigidbody2D.AddForce(Vector2.one * 1);
This is only done once and not each update.
The object should now move at a rate of 1 pixel (unity unit) per second. However it appears to be stationary until it eventually moves 1 pixel around 18 seconds later.
Where have I gone wrong?
EDIT:
Setting the velocity directly works just fine. However, I wish to use AddForce.
o.rigidbody2D.velocity = Vector2.one;
Your answer
Follow this Question
Related Questions
Rigidbody character controller can't walk on stairs 0 Answers
Velocity powered rigidbody on a moving platform without parenting. 3 Answers
Character Joints and Animations results in strange physic animation 1 Answer
Gravitational Object Creation for 3D Game 1 Answer
2d side scrolling problem 5 Answers