I’m starting to develop with VR, and I’m currently working on the hands. Almost everything works, however when the player moves their head in their real playspace, the hands get more and more offset. I’m sure there’s an easy fix that I missed. Any help is appreciated, thanks! :3
local LeftHandCFrame = game.VRService:GetUserCFrame(Enum.UserCFrame.LeftHand)
local RightHandCFrame = game.VRService:GetUserCFrame(Enum.UserCFrame.RightHand)
VRFolder.LeftHandPosition.CFrame = (Camera.CFrame*CFrame.new(LeftHandCFrame.Position*HeadScale))*CFrame.fromEulerAnglesXYZ(LeftHandCFrame:ToEulerAnglesXYZ())
VRFolder.RightHandPosition.CFrame = (Camera.CFrame*CFrame.new(RightHandCFrame.Position*HeadScale))*CFrame.fromEulerAnglesXYZ(RightHandCFrame:ToEulerAnglesXYZ())
I’m not sure what exactly is happening on your part, but if I has to guess, I would assume it has something to do with the way you set the position of the hands. To vaguely describe it, it looks like it has been offset twice.
I tried swapping the cframing code in my script with yours and it works now! I’m not sure what the problem was in the beginning but thanks for the help :3