PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

GetTouchpadMode

The GetTouchpadMode function returns the Enum/VRTouchpadMode indicating the mode of a specified Enum/VRTouchpad.

The returned mode indicates how the user interacts with their touchpad to play the game. For more information about the different types of modes, see the Enum/VRTouchpadMode page.

This can also be used alongside the several /UserInputService VR functions and events.

Since /VRService only runs client-side, this function will only work when used in a /LocalScript.

Parameters

Name Type Default Description

pad

The specified VRTouchpad.

Returns

Return Type Summary

The mode of the specified VRTouchpad.


Code Samples


VRService:GetTouchpadMode

This example retrieves and prints the name of the user’s current VRTouchpad.Left touchpad mode.

local VRService = game:GetService("VRService")

VRService:GetTouchpadMode(VRTouchpad.Left)