Results 1 to 2 of 2

Thread: Collision Detection

  1. #1

    Thread Starter
    Frenzied Member SomethinCool's Avatar
    Join Date
    Jan 2001
    Location
    Malvern, PA
    Posts
    1,407

    Lightbulb Collision Detection

    Ok i am new to game programming and i have a question..

    again, we are in a pong setup but there isnt any other paddle, it is just one paddle that moves up and down the left side of the screen and the ball bounces off the left, bottom, and right side of the form. What i need help with is making the ball bounce off the paddle. How can i do this?

    this code is the code for the bouncing ball.

    VB Code:
    1. With Shape2 'Ball to move
    2.         .Shape = vbShapeCircle
    3.         .Height = 255
    4.         .Width = 150
    5.     End With
    6.     RotateText1.Visible = False
    7.     Timer2.Interval = 50 'How often to move
    8.     Randomize
    9.     fintJump = 25 'Number of Twips to jump
    10.     fintMoveLeftRight = Int(100 * Rnd) - 10 * fintJump 'Change 5 if u want more angles
    11.     fintMoveUpDown = Int(100 * Rnd) - 10 * fintJump

  2. #2
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width