(I know it returns radians and I need a value between 0..360)
Anyone here that can shed some light on the subject?
Thanks in advance
Update: Ahh, just forgot to add 360 if below zero
Code: Select all
; Get angle of joypad controller
*ControllerData\Angle = atan2f(bbJoyX(ControllerID-1), bbJoyY(ControllerID-1)) * (180.0 / 3.14)
If (*ControllerData\Angle < 0)
*ControllerData\Angle = *ControllerData\Angle + 360
EndIf
