Added: 4 years ago
From: groundh0g
Views: 2,400
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (1)

Sign In or Sign Up now to post a comment!
  • I mention that in the chapter. Basically just take the current position and previous position, then divide the change in X by the width of the ball, checking for collisions at each step.

    Of course, you could also put an upper limit on the ball so that it never travels further than (paddle width + ball width) pixels in a single frame.

  • Thing is, when the movement gets fast enough, the ball can move right through objects, not noticing it's hit something. How would you get round that?

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more