I’m currently messing around with VR in roblox, however I can’t seem to change the orientation of the objects that use the CFrame of the hardware.
The hands are in the right position however the model of the headset is rotated to the right:
This code is in a LocalScript in StarterGui
wait(4)
workspace.CurrentCamera.CameraType = "Scriptable"
wait()
workspace.CurrentCamera.CFrame = CFrame.new()
local VRService = game:GetService("VRService")
VRService.UserCFrameChanged:Connect(function()
local RightHand = VRService:GetUserCFrame(Enum.UserCFrame.RightHand)
local LeftHand = VRService:GetUserCFrame(Enum.UserCFrame.LeftHand)
local Head = VRService:GetUserCFrame(Enum.UserCFrame.Head)
workspace.ServerScript.StuffHappened:FireServer(RightHand, LeftHand, Head)
end)
The Server script is in workspace
function PlaceholderName(player, RightHand, LeftHand, Head)
workspace.RightH.CFrame = (RightHand)
workspace.LeftH.CFrame = (LeftHand)
workspace.Union.CFrame = (Head)
end
script.MovementDetect.OnServerEvent:Connect(PlaceholderName)