Finding the angle
cgaliano
Member, PRO Posts: 21
Easy question for the experts, I am sure: What is the easiest way of finding the angle in which an actor is moving, relative to the scene? i.e. if the actor is moving horizontally, the angle would be 0 and if vertically it would be 90.
Comments
vectorToAngle( self.Motion.Linear Velocity.X , self.Motion.Linear Velocity.Y )%360
Thanks @Socks ... what is the "%360" for?
Oh, I just chucked that on the end to force the angles to be 0-360° rather than GameSalad's default 0-180° and then -180° to 0 (which I find a bit weird).
great, it works. Thanks a lot!