This project has moved and is read-only. For the latest updates, please go here.

Change direction without adding velocity

Topics: Developer Forum, User Forum
Nov 23, 2008 at 12:15 AM

Im having a ball bouning up and down. I have a paddle which the ball hits and bounces back. But i want the ball to change direction if it hits the paddle away from center of the paddle. My ball and paddle is using RestitutionCoeffiecient=1f for perfect bounce and the ball ignores gravity. So when i put my ball into motion it should never gain any more speed.

The way im getting the ball to move in  another direction if it hits away from center is to use Ball.ApplyForce(new Vector2(1000, 0)) for example. But this will eventually speed up the ball, How can i make the ball change direction without speeding it up?
Nov 23, 2008 at 12:25 AM
Nevermind i think. I sat LinearDragCoeffiecient =0f. That seems to work.