Documentation Topics
Function

PRVirconJoySetXYValue()

Sets the given joystick's position to the provided newX and newY values. If these values define a point outside of the joystick's max travel distance, that point will be clamped to the max distance that the joystick can reach along the same angle. Please note that this function is meant to be called on a joystick that has had its Snap to Center setting set to false For joysticks that snap to center, calling this function will affect the joystick's position for a single frame and then snap back to the center on the next frame. Also note that if the joystick's y-invert setting is true, the given newY value will represent a point that is inverted.


Declaration

PRVirconJoySetXYValue(joyId, newX, newY)

Parameters

joyId

The joystick ID.

newX

The x-value to set the joystick to.

newY

The y-value to set the joystick to.

Return Value

n/a