I’ve been trying to implement Enum.UserCFrame.Floor in my VR project to get the player’s real life height. When testing, I realized that the Floor and Head UserCFrame are both by default at (0, 0, 0), meaning there isn’t any way to get the player’s height from it. Unless I’m misunderstanding the Enum, doesn’t that make it completely useless? Thanks.
local RunService = game:GetService("RunService")
local VRService = game:GetService("VRService")
RunService.RenderStepped:Connect(function()
local FloorCFrame = VRService:GetUserCFrame(Enum.UserCFrame.Floor)
local HeadCFrame = VRService:GetUserCFrame(Enum.UserCFrame.Head)
local Height = (HeadCFrame.Y - FloorCFrame.Y)-- Get the distance between both returned CFrames
print(Height)
end)
This prints 0 every frame, unless the player crouches up or down in real life.