I’m trying to port this over to VR and have got the camera somewhat working, but I have no idea how to switch the controls over so that the character is controlled only by a 360 controller and not the mouse/cursor. If you know how to do this, please share. Thanks!
Wouldn’t you be able to change the controls in the input manager? Edit>Project Settings> Input
Do you want to disable the mouse/keyboard input completely?
Ok, so I got the controls working for the 360 by editing one of the scripts. I’ve also figured out how to disable the mouse/cursor thing and allow for the character to rotate with the right thumbstick. Now I just need to know the best way to bring in the OVR Camera. Right now I have it attached to the Main Camera with a Smooth Follow script. This is not working that well so if anyone has an idea that would work better, please do share
Thanks!
You could just link it directly to the character and position it where you want it.
Or you could write your own or look for alternate camera follow script.
Problem is, I’m not sure how to do that with a networked game.
There should be some methods in Photon for when new players enter a game and another for when the ‘game’ is first created you need to either have:
Two version of your characters one with the camera added one without for other players.
Or logic that moves the VR camera above the player and sets the player as it’s parent object.
Or have every player with the VR camera disabled and only enable your players VR camera.
I think the first approach should be easier as you just need to load the players character as the prefab with the camera. And any other players as the prefab without. Check out the viking example to see how it gets around this problem.
K, thanks!