1 person found this helpful
there's nothing wrong with your code.
use the trace() function to check the _rotation property and make sure it's correct, then check if there's a reg pt issue or something else preventing you from seeing the other rotations.
you were right about the registration point being part of the problem,
I ultimately had to turn the above bolded into this:
posdX = Number(robot_mc._x - _xmouse + 19);
posdY = Number(robot_mc._y - _ymouse - 38);
When I created a dynamic textbox to track rotation (what I use instead of trace to debug - personal preference) I noticed the rotation was locked to a negative, but when experimenting with tan, 4*tan, 360/pi, etc., I came to the conclusion the rotation couldn't be repaired and was counting some "mysterious value". The mysterious value was the rotation eye itself. To correct this mistake, I used the robot body as the "grounding point" and then adjusted the coordinate according to the difference from the center of the eye to the center of the robot (trial and error guess work).
The center is the eye now, and it works fine. Thank you for the suggestion, although I admit I didn't know what "reg pt" meant (I had to google it).
had to use a non rotating mc to determine the relative rotation of an object.