PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. To see our new and improved documentation, please click here. You can read more about the future of documentation here.
Collapse Sidebar

SetTouchpadMode

The SetTouchpadMode function sets the mode of the specified Enum/VRTouchpad to the specified Enum/VRTouchpadMode.

This can be used to change the user’s virtual reality (VR) touchpad mode so that the user interacts with the game different using the touchpad. 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 you want to set the mode of.

The mode you want to set the specified VRTouchpad to.

Returns

Return Type Summary

No return.


Code Samples


VRService:SetTouchpadMode

​This example sets the user’s VRTouchpad.Left touchpad mode to TouchMode.Touch. This means that the left touchpad is treated as ButtonB.