|
@@ -57573,12 +57573,12 @@ var BABYLON;
|
|
|
HemisphericParticleEmitter.prototype.startPositionFunction = function (worldMatrix, positionToUpdate, particle) {
|
|
|
var randRadius = this.radius - BABYLON.Scalar.RandomRange(0, this.radius * this.radiusRange);
|
|
|
var v = BABYLON.Scalar.RandomRange(0, 1.0);
|
|
|
- var phi = BABYLON.Scalar.RandomRange(0, Math.PI);
|
|
|
+ var phi = BABYLON.Scalar.RandomRange(0, 2 * Math.PI);
|
|
|
var theta = Math.acos(2 * v - 1);
|
|
|
var randX = randRadius * Math.cos(phi) * Math.sin(theta);
|
|
|
var randY = randRadius * Math.cos(theta);
|
|
|
var randZ = randRadius * Math.sin(phi) * Math.sin(theta);
|
|
|
- BABYLON.Vector3.TransformCoordinatesFromFloatsToRef(randX, randY, randZ, worldMatrix, positionToUpdate);
|
|
|
+ BABYLON.Vector3.TransformCoordinatesFromFloatsToRef(randX, Math.abs(randY), randZ, worldMatrix, positionToUpdate);
|
|
|
};
|
|
|
/**
|
|
|
* Clones the current emitter and returns a copy of it
|