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

RecenterUserHeadCFrame

The RecentUserHeadCFrame function recenters the DataType/CFrame of the user’s head to the current location of the VR headset being worn by the user.

This function can be used to ensure that the user’s in-game head is positioned according to the location of the user’s VR headset.

This is similar to the UserInputService function, UserInputService/RecenterUserHeadCFrame.

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

Returns

Return Type Summary

No return.


Code Samples


VRService: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 VRService = game:GetService("VRService")

VRService:RecenterUserHeadCFrame()