PDA

View Full Version : How do I determine if angle x is within y degrees of mc._rotation



Mike D
September 14th, 2005, 10:12 PM
Hi, I'm having a problem determining if the angle created between two movie clips (which I've calculated with Math.atan2) is within +/-35 degrees of movie clip b's rotation. Can somebody help me with the code, or at least the math?!

TheCanadian
September 14th, 2005, 11:04 PM
Can your code please?

Mike D
September 14th, 2005, 11:42 PM
I don't have any code for this particular method because I don't know where to start. I've attached an image in case it helps clairify my problem.

Mike D
September 15th, 2005, 07:39 PM
ok I got it... I basically created an adjustment variable which automatically updates so that the boundaries always remain constant, with one at 0 degrees and the other at 70 degrees. From there it's easy to check if the third line is in between the two angles.


I guess I just needed to sleep on it hehehe