Fix to setting initial velocity by DefaultParticleInfluencer.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7633 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
Kae..pl 2011-06-15 12:05:53 +00:00
parent 11a8c132fc
commit 07a2a44f7f

View File

@ -38,6 +38,7 @@ public class DefaultParticleInfluencer implements ParticleInfluencer {
* the particle to be affected * the particle to be affected
*/ */
protected void applyVelocityVariation(Particle particle) { protected void applyVelocityVariation(Particle particle) {
particle.velocity.set(startVelocity);
temp.set(FastMath.nextRandomFloat(), FastMath.nextRandomFloat(), FastMath.nextRandomFloat()); temp.set(FastMath.nextRandomFloat(), FastMath.nextRandomFloat(), FastMath.nextRandomFloat());
temp.multLocal(2f); temp.multLocal(2f);
temp.subtractLocal(1f, 1f, 1f); temp.subtractLocal(1f, 1f, 1f);