A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Find hitTest angle

  1. #1
    Can i play now????
    Join Date
    Jun 2003
    Location
    Greece
    Posts
    309

    Find hitTest angle

    Hi.
    I want to create a pong game.
    I want to find the angle that the pall hits the pud so i can send it back with another. Is there any way that i can do it???
    Mess With The Best, Die Like The Rest...

  2. #2
    half as fun, double the price senocular's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, CA (USA)
    Posts
    4,361
    you dont need to know any angles for pong (basic pong) - all you need to do is reverse the _x direction (for paddles, _y direction for wallS). Then the ball "bounces" accordinly at the right angle.

    If however, you want to be able to alter the reflection with proximity to the center of the paddle, then youd need some extra work, throwing in some trig, but that depends on how involved youre getting.

  3. #3
    Can i play now????
    Join Date
    Jun 2003
    Location
    Greece
    Posts
    309

    hitTest angle

    I want to find the angle so i can change it according to the distance from the center of the pud.
    I know that method but i don`t wan`t it.
    Mess With The Best, Die Like The Rest...

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

HTML5 Development Center