I have a gun that, when I use onPress, rotates the gun that makes it look like it’s recoiling back. But the problem is that when it rotates, it rotates itself off the click of the mouse .
i have
_x = _root._xmouse;
_y = _root._ymouse;
and
onPress = function () {
_rotation -= 80;
}
if (_rotation < 0) {
_rotation += 10;
}
When it rotates, the shape of the gun falls off the mouse… how do I fix that?
also, I would like a line that beams between a gun and an object… how would I go about doing that?
I like to try things before asking people and the only concept I have is find the distance between the gun and the object then draw a line or change the length of a line to the distance between the gun and and the object.
so maybe like…
gunPos = gun._x+_width/2;
objPos = target._x-_width/2;
I guess this would tread into the hitBox area, huh? If the gun was to be rotated… ugh i’m confused