Browse Source

Merge pull request #14362 from mrdoob/webvr

WebVRManager: Overwrite camera position by default for consistency.
Mr.doob 7 năm trước cách đây
mục cha
commit
8fcbbc53f8
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  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;