PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
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.

local UserInputService = game:GetService("UserInputService")
UserInputService:RecenterUserHeadCFrame()