Or whatever you want to call it…
Anyhow, I have a man, and his arm follows the mouse (points to it, mouse detection).
But how do I do so that he can shoot where the mouse clicks…?
I hope you understand my question, I can’t quite explain it!
This is the code for the arm:
onClipEvent (mouseMove) {
x = this._xmouse;
y = this._ymouse*-1;
angle = Math.atan(y/x)/(Math.PI/180);
if (x<0) {
angle += 180;
}
if (x>=0 && y<0) {
angle += 360;
}
updateAfterEvent();
_root.arm._rotation=angle*-1;
}