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

RecenterUserHeadCFrame

This function recenters the DataType/CFrame of the VR headset to the current orientation of the headset worn by the user. This means that the headset’s current orientation is set to CFrame.new().

Use this function to to move the headset CFrame to the center of the play area if it seems to be at a weird offset.

This behaves identically to the VRService function, VRService/RecenterUserHeadCFrame.

Since UserInputService is client-side only, this function can only be used in a LocalScript.

Returns

Return Type Summary

Code Samples


UserInputService:RecenterUserHeadCFrame

This example fires the function to recenter the CFrame of the user’s head to the current location of the VR headset being worn by the user.