Bouncing Ball

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

  • SocksSocks London, UK.Member Posts: 12,822

    Turn friction, for both the paddle and the ball, to zero.

  • jbishop122jbishop122 Member Posts: 43

    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?

  • jbishop122jbishop122 Member Posts: 43

    Anyone?

  • SummationSummation Member, PRO Posts: 476

    Did you adjust the physics on the "top" whatever the top is?

  • SocksSocks London, UK.Member Posts: 12,822
    edited April 2015

    @jbishop122 said:
    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?

    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 ! :smile: Hope that makes sense.

  • jbishop122jbishop122 Member Posts: 43

    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?

  • jbishop122jbishop122 Member Posts: 43

    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)

  • SocksSocks London, UK.Member Posts: 12,822
    edited April 2015

    ...

  • jbishop122jbishop122 Member Posts: 43

    What?

  • SummationSummation Member, PRO Posts: 476
    edited April 2015

    If you're making pong it probably has to do with the angle of incidence and the angle of reflection.

Sign In or Register to comment.