Please make a point to support HeadScale in VR

The Camera.HeadScale property is largely unsupported by the CoreGui and PlayerModule. This has been a problem for a long time now, but the recent update worsened its effects on the CoreGui.

The laser pointers (and hence the 2D UI) are very unintuitive and difficult to use as they do not account for HeadScale.

As of the recent update, the VR bottom menu is impossible for players to use with different HeadScales. e.g. the project I am working on right now uses a HeadScale of 20, in which case the menu is completely invisible.

Please make a point to support HeadScale properly going forward. Such a simple oversight is leading to a consistently broken VR experience, and makes it more difficult for existing projects to add VR support without completely rewriting their entire UIs.

Solution suggestion

Aside from event listeners/structural stuff, the actual logic required to support HeadScale is extremely simple:

local ScaledUserCFrame = OriginalUserCFrame.Rotation + OriginalUserCFrame.Position*HeadScale

I have looked in the core scripts and PlayerModule (and edited the latter) and the addition of the above line of code is literally the only thing preventing most of this stuff from working.

You can fix this problem very easily by Ctrl+Shift+F-ing for any calls to GetUserCFrame( in the core scripts and PlayerModule. For each of those instances, you can then apply the line of code I provided above to scale by HeadScale before any CameraCFrame * UserCFrame and after any UserCFrame * Offset operations.

There may be some extra stuff that relies on an assumption about HeadScale, but from what I can tell there isn’t much.

8 Likes