Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to precisely follow the head movement in Vr ?

Asked by
gs_115 11
4 years ago

hello , i work on vr game but i have a problem with the head calibration. when i look at a side of my room , all work but when i look the other side some rotation are glitched:

Y rotation are never glitched.

X rotation move the camera with the Z rotation

And Z rotation move the camera with the X rotation.

local VR = game:GetService("VRService")

local head = VR:GetUserCFrame(Enum.UserCFrame.Head)
local offset = head
workspace.CurrentCamera.CFrame= workspace.Room.VrPart.CFrame:ToWorldSpace(offset)

the VrPart is the center of the room.

Answer this question