# SetVirtualJoystickPosition

## Description

Sets the position of the virtual joystick in screen coordinates. You can use GetVirtualWidth and GetVirtualHeight to find the current bounds of the screen. The joystick will be centered on the given x and y position. Moving a virtual joystick whilst it is in use will alter the current X and Y values being returned.

## Definition

SetVirtualJoystickPosition( index, x, y )

void agk::SetVirtualJoystickPosition( UINT index, float x, float y )

## Parameters

- index - The ID of the virtual joystick to set.
- x - The x coordinate of the new position.
- y - The y coordinate of the new position.