Apr 8, 2011 at 5:05 PM
Edited Apr 8, 2011 at 5:06 PM
Yes I have a Pong question. This must be too simple for you guys but apparently it's not for me :(.
I have a paddle (dynamic rectangle body) and a ball (circle body). On the edges of the paddle are static wall bodies to prevent the paddles and ball from leaving the screen.
The problem is of course that the paddles are being pushed back by the ball.
A: Give the paddles an astronomical high mass compared to the ball's mass.
Result: It doesn't work because when the ball is squished between a paddle and a wall the paddles are still moved left/right.
B: Manually set the paddle's bodies X-position back every Update-cycle
Result: It solves the problem for the paddles but with this approach the ball starts behaving strange upon contact with the paddle.
C: Manually set the paddle's bodies LinearVelocity.X back every Update-cycle.
Result: The same as B.
D: Use a static body for the paddle
Result: I didn't even try this. Obviously this will cause problems when the ball is squished between the paddle and the wall.
I read the discussion on: http://farseerphysics.codeplex.com/discussions/66727 but none of the solutions worked for me and the last solution offered doesn't work in the latest FPE I think because there are no more geoms+bodies.
This must be soooo easy. Can anyone please enlighten me?