- Home /
Locking OVRCamerarig for a few seconds to load script.
I'm building an app for the GearVR. Basically, I need the virtual reality camera to stay put for a few seconds to let me load a script that instantiates a 3d model that will follow the camera around and will stay within the player's field of vision.
The problem is this 3d model will take a bit to load and the player looking around will cause the object to spawn after the player has looked away and follow the camera but outside its field of view.
Is there any way to keep the ovr camera still for a few seconds so I can load this script?
Answer by Winterblood · Jul 08, 2016 at 11:42 AM
Never lock the camera, that will make the player nauseous. Is there a reason you can't spawn the object in front of the current camera position or preload the object based on proximity?
I have a PUN script that connects to the server in order to spawn a multi player object. So I send the coordinates where the camera is looking, but because the server takes about 2 seconds to respond, if the player moves, the object will not be synched to the camera. The easiest way to fix it would be to lock the camera for 2 seconds, but if it's not possible I will take any suggestions haha.
Answer by S1l3nz3 · Jul 12, 2016 at 05:42 PM
I'm using PUN to spawn a game object that keeps track of the position of the camera. The problem is since it has to connect to their server, the script will send the position where it needs to spawn but the player usually moves around and by the time the server response comes back, the object will of course spawn on the spot he was looking at the beginning instead of where hes looking at the moment. Thanks for answering by the way!
Your answer
Follow this Question
Related Questions
GearVR, Using Swipe to control Camera in VR 0 Answers
GearVR Recenters view when you take off and put on the headset 1 Answer
anybody working on gear vr oculus ? 0 Answers
Occulus Vr and Unity 0 Answers
Unity on Gear VR with Galaxy S6 2 Answers