VR Camera Toggle

I’m currently making a VR game but ran into a slight issue that I think may mess up gameplay. Whenever I press the thumbstick on my right controller (ButtonR3), my camera is toggled to Classic when it is originally in First Person, allowing me to see my character. I’ve tried using the following code, but it doesn’t do anything. Also, I use an Oculus Quest 2.

local UserInputService			= game:GetService("UserInputService")

local Player					= game.Players.LocalPlayer

Player.CameraMode				= Enum.CameraMode.LockFirstPerson

UserInputService.InputBegan:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.ButtonR3 then
		wait(0.25)
		
		if Player.CameraMode == Enum.CameraMode.Classic then
			Player.CameraMode	= Enum.CameraMode.LockFirstPerson
		end
		
	end
end)

Video:

https://gyazo.com/d10f1f5ed5dae51770659c771ca98330

1 Like

Gonna bump up this post because I still haven’t found a solution

1 Like

Fork the necessary playermodule scripts and modify it to not toggle on ButtonR3

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.