A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: back and forward

  1. #1
    incredibulus-actionscriptum magnetos's Avatar
    Join Date
    May 2001
    Posts
    2,160
    hi guys

    suppose you have a car and a circle road
    the car goes around from a start point and then reaches the end point

    now how do we know if the car is going the wrong way??
    and what if the road has an irregular shape? any idea?

    i think some trig may involved here ...not sure though

    cia






  2. #2
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,227
    Basically you can set up a series of checkpoints (those can be invisible).
    Lets say you put 3 checkpoints on the road and if player goes right way, he will go through point1>point2>point3
    If he goes wrong way, it will be point3>point2>point1

    so, when next point is reached, you check if the last point was correct.

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