Przeglądaj źródła

Fix camera gimbal lock (#442)

Pavel Alexandrov 7 lat temu
rodzic
commit
6a053444e7
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      h3d/scene/CameraController.hx

+ 1 - 1
h3d/scene/CameraController.hx

@@ -228,7 +228,7 @@ class CameraController extends h3d.scene.Object {
 
 		if( moveY != 0 ) {
 			targetPos.z -= moveY * 0.003 * rotateSpeed;
-			var E = 1e-8;
+			var E = 2e-5;
 			var bound = Math.PI - E;
 			if( targetPos.z < E ) targetPos.z = E;
 			if( targetPos.z > bound ) targetPos.z = bound;