I am currently working on a simple VR engine for one of my games. I am adding smooth rotation to the game.
The problem I’m facing while working on my game is the hands won’t follow my head.
Here is the code.
local LHandCFrame = vrs:GetUserCFrame(Enum.UserCFrame.LeftHand)
local RHandCFrame = vrs:GetUserCFrame(Enum.UserCFrame.RightHand)
local LeftHandCFrame = CFrame.new(cam.CFrame.Position) * CFrame.new((LHandCFrame.p - headCFrame.Position)*headScale) * CFrame.Angles(0, math.pi*turning_rot, 0) * CFrame.fromEulerAnglesXYZ(LHandCFrame:ToEulerAnglesXYZ())
local RightHandCFrame = CFrame.new(cam.CFrame.Position) * CFrame.new((RHandCFrame.p - headCFrame.Position)*headScale) * CFrame.Angles(0, math.pi*turning_rot, 0) * CFrame.fromEulerAnglesXYZ(RHandCFrame:ToEulerAnglesXYZ())
Any help would be appreciated!