Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How To Track VR Headset & Controllers?

I have been messing with VR for about an hour cant find how to track the headset or controllers all i know is that i need to use this:

game:GetService("VRService"):GetUserCFrame()

but I don't know the parameters for "GetUserCFrame" any help would be appreciated

1 answer

✓ Accepted answer

GetUserCFrame needs a UserCFrame. These are Head,Lefthand,Righthand. Heres some examples of how to use these.

local cf = game:GetService("VRService"):GetUserCFrame(Enum.UserCFrame.Head) --Get headset cframe.
local cf = game:GetService("VRService"):GetUserCFrame(Enum.UserCFrame.LeftHand) --Get left hand controller cframe.
local cf = game:GetService("VRService"):GetUserCFrame(Enum.UserCFrame.RightHand) --Get right hand controller cframe.

This discussion is preserved as it was. New answers, comments, and votes are closed.