|
@@ -12053,6 +12053,9 @@ var BABYLON;
|
|
var sina = Math.sin(this.alpha);
|
|
var sina = Math.sin(this.alpha);
|
|
var cosb = Math.cos(this.beta);
|
|
var cosb = Math.cos(this.beta);
|
|
var sinb = Math.sin(this.beta);
|
|
var sinb = Math.sin(this.beta);
|
|
|
|
+ if (sinb === 0) {
|
|
|
|
+ sinb = 0.0001;
|
|
|
|
+ }
|
|
var target = this._getTargetPosition();
|
|
var target = this._getTargetPosition();
|
|
target.addToRef(new BABYLON.Vector3(this.radius * cosa * sinb, this.radius * cosb, this.radius * sina * sinb), this._newPosition);
|
|
target.addToRef(new BABYLON.Vector3(this.radius * cosa * sinb, this.radius * cosb, this.radius * sina * sinb), this._newPosition);
|
|
if (this.getScene().collisionsEnabled && this.checkCollisions) {
|
|
if (this.getScene().collisionsEnabled && this.checkCollisions) {
|