>What is the easiest way to calculate an angle?

You can use ATAN with two integers to see the angle from one to the 
other, it even takes care of the zero angle case. For your job you 
would do that twice, and add the numbers together:

   angle1 = atan(sprite(2).loch - sprite(1).loch, sprite(2).locv - 
sprite(1).locv)
   angle2 = atan(sprite(2).loch - sprite(3).loch, sprite(2).locv - 
sprite(3).locv)
   angleindegrees = (angle2-angle1) *180/pi


Here's a sample movie:

http://staging.funnygarbage.com/colin/angular.dir

It's a DIR, you can open it from within Director. Just drag the three 
dots to see the angle change.


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to