File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
OSVR-Unity/Assets/OSVRUnity/src Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ public class DisplayController : MonoBehaviour
5252 private uint _viewerCount ;
5353 private bool _renderedStereo = false ;
5454 private bool _displayConfigInitialized = false ;
55+ private bool _checkDisplayStartup = false ;
5556 private Camera _camera ;
5657 private bool _disabledCamera = true ;
5758
@@ -210,11 +211,19 @@ void OnPreCull()
210211 //update the client
211212 UpdateClient ( ) ;
212213
213- //update the viewer's head pose
214- viewer . UpdateViewerHeadPose ( DisplayConfig . GetViewerPose ( viewerIndex ) ) ;
214+ //update poses once DisplayConfig is ready
215+ if ( _checkDisplayStartup )
216+ {
217+ //update the viewer's head pose
218+ viewer . UpdateViewerHeadPose ( DisplayConfig . GetViewerPose ( viewerIndex ) ) ;
215219
216- //each viewer update its eyes
217- viewer . UpdateEyes ( ) ;
220+ //each viewer update its eyes
221+ viewer . UpdateEyes ( ) ;
222+ }
223+ else
224+ {
225+ _checkDisplayStartup = DisplayConfig . CheckDisplayStartup ( ) ;
226+ }
218227 }
219228
220229 // Flag that we disabled the camera
You can’t perform that action at this time.
0 commit comments