A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: computer player movement help

  1. #1
    Member
    Join Date
    Jun 2009
    Posts
    44

    computer player movement help

    Hello All,
    I have started making a bat and ball type game where you hit a ball and a computer player gets it. What I want to know is the angle of the shortest path from the point of the player to the path of the ball (I found out tha it will be perpendicular to the path of the ball).
    The things that I know is the angle of what the ball is travelling and the point of the player.
    Any help is greatly appreciated. Thankyou all so much.

  2. #2
    Junior Member
    Join Date
    May 2006
    Posts
    21
    If I'm understanding your question correctly you need the angle of the computer player in reference to a horizontal line to hit the path of the ball perpendicularly.

    It should be simple 90-the angle of the ball.

    If the ball strikes the path perpendicularly it forms a right angle triangle.

  3. #3
    Member
    Join Date
    Jun 2009
    Posts
    44
    I realise that but if you put the fielder over the other side of the path then it will only be moving away from it.

Tags for this Thread

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