Reproduction Steps
1. Open an empty place in Studio with VR enabled
2. Play solo
3. Notice how the movement of the laser pointers matches your VR controllers/hands perfectly
4. In Studio, manually set Camera’s HeadScale property to something big e.g. 30 (I recommend you close one eye after this step as the default camera scripts do not handle HeadScale correctly in third-person)
5. Notice how the movement of the laser pointers no longer match perfectly.
In place of 4., it is useful to have a button on the VR controllers to toggle between scales. If you want this, put the following LocalScript inside StarterPlayerScripts (this script uses the B button on the right-hand controller):
game:GetService("ContextActionService"):BindAction("aa", function(_, state)
if state == Enum.UserInputState.Begin then
workspace.CurrentCamera.HeadScale = (workspace.CurrentCamera.HeadScale == 1 and 30) or 1
end
end, false, Enum.KeyCode.ButtonB)
Expected Behavior
The origin of the laser pointers matches the VR controllers/hands regardless of what the value of Camera.HeadScale is. In code, PointerCFrame = HandUserCFrame.Rotation + HandUserCFrame.Position*Camera.HeadScale
.
Actual Behavior
The origin of the laser pointers do not match the VR controllers/hands when Camera.HeadScale is bigger than 1 (I haven’t tested less-than).
This seems to be because they have not been scaled by Camera.HeadScale, i.e. in code PointerCFrame = HandUserCFrame
.
This is a pretty significant problem because it reduces the usability of the 2D UI while in VR. It is _impossible_ for developers to implement their own pointers to fix this simple bug because the UserGui (the name of the part which the 2D UI is projected on) is controlled by the core scripts and has its behavior affected by the buggy pointers.
Issue Area: Engine
Issue Type: Display
Impact: Very High
Frequency: Constantly
Date First Experienced: 2022-06-01 00:06:00 (+12:00)