فهرست منبع

fix for arcRotateCamera when beta is near 0

Adam Bowman 8 سال پیش
والد
کامیت
8d624c25c9
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      src/Cameras/babylon.arcRotateCamera.ts

+ 3 - 2
src/Cameras/babylon.arcRotateCamera.ts

@@ -288,14 +288,15 @@
             this.inputs.checkInputs();
             this.inputs.checkInputs();
             // Inertia
             // Inertia
             if (this.inertialAlphaOffset !== 0 || this.inertialBetaOffset !== 0 || this.inertialRadiusOffset !== 0) {
             if (this.inertialAlphaOffset !== 0 || this.inertialBetaOffset !== 0 || this.inertialRadiusOffset !== 0) {
-                this.beta += this.inertialBetaOffset;                    
-
+                
                 if (this.getScene().useRightHandedSystem) {
                 if (this.getScene().useRightHandedSystem) {
                     this.alpha -= this.beta <= 0 ? -this.inertialAlphaOffset : this.inertialAlphaOffset;
                     this.alpha -= this.beta <= 0 ? -this.inertialAlphaOffset : this.inertialAlphaOffset;
                 } else {
                 } else {
                     this.alpha += this.beta <= 0 ? -this.inertialAlphaOffset : this.inertialAlphaOffset;
                     this.alpha += this.beta <= 0 ? -this.inertialAlphaOffset : this.inertialAlphaOffset;
                 }
                 }
 
 
+                this.beta += this.inertialBetaOffset;
+
                 this.radius -= this.inertialRadiusOffset;
                 this.radius -= this.inertialRadiusOffset;
                 this.inertialAlphaOffset *= this.inertia;
                 this.inertialAlphaOffset *= this.inertia;
                 this.inertialBetaOffset *= this.inertia;
                 this.inertialBetaOffset *= this.inertia;