-
Limit angle for weapon
Im using this formula to calculate angle of players gun:
Code:
ATan2(Y( "minigun" ) - YMouse, XMouse - X( "minigun" ) )
And angle of minigun is set exacly what I wanted, but... I need to limit this angle between -90 degrees
(wich means weapon is facing straight down to the ground)
and 60 degrees (wich is slightly up to the sky).
//refrasing question.
Now how reset var CurrAngle, when this is not working
http://screenshu.com/static/uploads/.../g3/wpx6xn.jpg
Event #23 set angle
Event #24 resets to 0 angle...
-
You should remove the "OR" X) (and also always can go)
Angle difference must be both >-90 and <= 60
-
-
Ok, nevermind. I found solution, crappy way, but now works.
But good advices would be appreciated