- Home /
rigidbody2D.AddForce causing other objects to float away
I created a 2D pong style game in which the ball's velocity changes based on a condition. However, as the value for AddForce increases the player objects begin floating away from the ball. Only logical explanation I can find is the force coming from the ball is causing it.
Has anyone experienced this before?
Is there anyway to remedy this?
Will rigidbody2d.velocity cause the same issue?
Do the player-object have a rigidbody? If it does it will be pushed back when the ball hit it, and I don't think it's necessary anyway because it is not used in tranform.Translate which I think is the best way to move the player in a pong styled game.
Answer by Gamelands-Studio · Aug 11, 2019 at 08:31 PM
You can Freeze your player's x position, or you can remove your rigidbody from your players and use transform.Translate() instead,