Ball Collision

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sake
    New Member
    • Jan 2007
    • 46

    #1

    Ball Collision

    Dear All,
    I'm working on a 3d breakout game in C++, and I'm having a little trouble with the collision. It will detect that the ball has hit the paddle just fine, but after that, how do I determine where the ball should go? I've just been mirroring the direction
    Code:
    Ball.Velocity().x *= -1;
    But this makes for very uninteresting gameplay. Any help would be very greatly appreciated.
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    The angle of incidence is equal to the anfle of reflection.

    That is, a 30-degree angle from the paddle surface will be reflected at 30-desgrees from the paddle surface. After that it's a simple Cartesian plot.

    Comment

    Working...