Explorar o código

Merge pull request #14362 from mrdoob/webvr

WebVRManager: Overwrite camera position by default for consistency.
Mr.doob %!s(int64=7) %!d(string=hai) anos
pai
achega
8fcbbc53f8
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      src/renderers/webvr/WebVRManager.js

+ 6 - 1
src/renderers/webvr/WebVRManager.js

@@ -211,7 +211,12 @@ function WebVRManager( renderer ) {
 
 	this.getCamera = function ( camera ) {
 
-		if ( device === null ) return camera;
+		if ( device === null ) {
+
+			camera.position.set( 0, scope.userHeight, 0 );
+			return camera;
+
+		}
 
 		device.depthNear = camera.near;
 		device.depthFar = camera.far;