CoreGui VR Components Rely On HeadLocked Being True

HeadLocked = true:

HeadLocked = false:

Repro code (use trigger to change between modes):

local Camera = game.Workspace.CurrentCamera
local VRService = game:GetService("VRService")

game:GetService("UserInputService").InputBegan:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.ButtonL2 or Input.KeyCode == Enum.KeyCode.ButtonR2 then
		Camera.HeadLocked = not Camera.HeadLocked
	end
end)

game:GetService("RunService"):BindToRenderStep("VRBugRepoUpdate",999,function()
	if Camera.HeadLocked == false then
		Camera.CFrame = VRService:GetUserCFrame(Enum.UserCFrame.Head)
	end
end)

I ran into this bug while working my custom VR character model. I had to create a hack to be able to set a custom camera CF while maintaining the GUIs, and the hack relies on the character existing (may not happen in every case of VR). With this bug, things like the menu can’t be accessed.

5 Likes

cc @0xBAADF00D

1 Like

Thanks for pointing this out. I’ll see if I can get it fixed soon.

2 Likes

This is still an issue 2 years later. Here I compare HeadLocked = true and HeadLocked = false:

This bug with the core GUI is gamebreaking as simple operations like leaving the game are rendered inaccessible.

Is a fix for this still in the works?

9 Likes

Roblox hasn’t touched VR for around 2 years now so a fix for this is definitely not in the works. It would be cool if there was but I doubt it’ll be fixed any time soon.

4 Likes

Sorry for bumping again. but this is a fairly major and potentially game breaking issue.

For one, I can’t have dev products or game passes in my VR games for VR users if they can’t use the Guis…
For two, it means I have to make my own GUI system from scratch if I don’t want to use headlocked. Which for a Higher level VR game is required.

If you try to remedy this by moving the parts in VRCorePanelParts, the cursor gets messed up if you turn the camera at all…
it seems to always assume that the core panel is in the center of the screen…

5 Likes