We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm creating a simple radar simulation and need to display the relative bearing of a joystick cursor. I'm using the GameControlPlus library, and getting excellent results with a Logitech Extreme 3D stick. I'm just not up to speed on the trig to do this...
I'd like to be able to display the relative degree position of the joystick cursor, such at at the top of the screen it would show 0 degrees, when in the 3 o'clock position it would be 90 degree, and 6 o'clock would show 180 degrees and a 9 o'clock it would show 270... and so on. I guess the max would be 359 deg after which the bearing would become 0 again. This is relative to the center of the screen, so the Y portion (width) should have no effect on the reading.
I suspect this is fairly trivial to do, but as a Processing noob, my best efforts have failed!