We have some important updates to VR support including:
- OpenXR support (replaces OpenVR and OculusVR)
- Height Scaling
- Floor Tracking
We want to make Roblox in VR as immersive as possible so that players feel like they are grounded and positioned properly within every virtual world. Our goal is to align the virtual space as closely as possible with the player’s space in the real world. This includes keeping the floor at the same location in both the virtual and real world space.
With the latest VR release, the player’s view of the virtual world will automatically scale so that your avatar feels human-sized and roughly represents your real world size. We have also introduced new APIs to allow developers to track the location of the floor if a device provides it.
In addition, with this release we are moving to OpenXR, providing a solution for developers to easily support every current and future VR headset that Roblox officially supports.
As part of our effort to modernize and unify Roblox VR, we are switching the backend for existing PC-VR and all VR headsets going forward to use the OpenXR API. Currently, this includes support for the Oculus Rift and Rift S, the Meta Quest 2 and Pro (connected to a PC through a link cable/airlink) as well as the Valve Index and HTC Vive using Steam VR. Please follow the new help page to enable OpenXR in either the Oculus App or Steam VR.
Height scaling and floor tracking depend on a valid room-scale setup. If you experience incorrect scaling when you are testing, please recalibrate and re-center your headset.
We know players love changing their avatars and they don’t necessarily match or line up well with their real-life bodies. Experiencing a view where your position in the world feels like your real legs are stuck in the ground or you are floating high up in the air can break the immersion of the experience.
VRService.AutomaticScaling = Enum.VRScaling.World, Camera.Headscale set, it will automatically adjust the size of the world so that your avatar’s size and view of the world adjusts to your real world height. For example, if your avatar is giant-sized in the world, you will see the world as if you are a giant. If you’d prefer to manage scaling yourself, you can also set
VRService.AutomaticScaling = Enum.VRScaling.Off.
Here’s a video of a user playing as a baby sparrow in Feather Family with scaling off (left) and scaling on (right). Notice the difference in size between the controllers and the objects and how close the user’s head is to the floor.
We have added a new UserCFrame API that allows developers to get the location of the center of the floor in a play area. This API can be used just like the other UserCFrame Enums. This example will place a part at the floor location.
local VRService = game:GetService("VRService") local floorOffset = VRService:GetUserCFrame(Enum.UserCFrame.Floor) floorOffset = floorOffset.Rotation + floorOffset.Position * workspace.CurrentCamera.HeadScale part.CFrame = workspace.CurrentCamera.CFrame * floorOffset
This API can be used to get the floor’s height as well as anchor parts to a location in the real world that won’t change even through re-center calls.
As always, we would love to hear any feedback you may have on the new features and VR in general, including any issues you run into or missing capabilities.