Bouncing Ball
jbishop122
Member Posts: 43
So I'm making a game sort of like Pong (It's different, just a good comparison.) I need help with the ball physics. I want the ball to hit the paddle without slowing down. Any answers?
Comments
Turn friction, for both the paddle and the ball, to zero.
Thanks @Socks. Do you know how to make the ball stop going up to the top every time and getting stuck? The ball keeps going up when hit and bounces forever. Any Ideas?
Anyone?
Did you adjust the physics on the "top" whatever the top is?
Mathtap.com (Android) | Fridgemanager.com (Android) | Breakoutofspace.com (Android)
What 'top' ? You not explained anything about your code, you've just described a problem that the code is producing. A little like saying I am doing a calculation and the result keeps coming out as 1015, which is not what I should get, so can anyone tell me why I am getting 1015 and not the correct answer ! Hope that makes sense.
The top is the border of the screen, so the ball doesn't go off the screen. Every time the ball hits the "paddle". A part of my code to make this random is a Collision where when the ball collides with the paddle, It is supposed to accelerate to a random area between 50 and 320 at a speed of 300 (also relative to actor). When I do this, nothing actually changes. Do I need to explain it in a better way?
So after messing around with the density, I got the ball to bounce back and forth, however, when the ball hits the "top" and "bottom" parts of the paddle (not screen) the ball stops entirely. (P.S. I fixed everything in the posts above, just thought I keep this on one discussion)
...
What?
If you're making pong it probably has to do with the angle of incidence and the angle of reflection.
Mathtap.com (Android) | Fridgemanager.com (Android) | Breakoutofspace.com (Android)