Returns the joysticks point-of view position.



Argument Description
id The id of the joystick (1 or 2).

Returns: Real


This function will return the point-of view position of the joystick/gamepad with the given id. This is an angle between 0 and 360 degrees, where 0 is forwards, 90 to the right, 180 backwards and 270 to the left. When no point-of-view direction is pressed by the user -1 is returned. The id can be either 1 or 2 as GameMaker: Studio only accepts input from a maximum of two joysticks/gamepads.

NOTE: This function is only available for Windows.


if joystick_has_pov(1)
   c_angle = joystick_pov(1);

The above code checks to see if a joystick or gamepad has point of view capabilities and if it does it sets a variable to the returned value of the joystick_pov function.

Back: Joystick Input
Next: joystick_exists
© Copyright YoYo Games Ltd. 2018 All Rights Reserved