Merge pull request #14358 from super626/v3

Fix PUParticle Bug
This commit is contained in:
pandamicro 2015-11-11 14:46:08 +08:00
commit 25404a260b
1 changed files with 5 additions and 4 deletions

View File

@ -448,6 +448,11 @@ void PUParticleSystem3D::forceUpdate( float delta )
prepared(); prepared();
Vec3 currentPos = getDerivedPosition();
_latestPositionDiff = currentPos - _latestPosition;
_latestPosition = currentPos;
_latestOrientation = getDerivedOrientation();
if (!_emitters.empty()){ if (!_emitters.empty()){
emitParticles(delta); emitParticles(delta);
preUpdator(delta); preUpdator(delta);
@ -455,10 +460,6 @@ void PUParticleSystem3D::forceUpdate( float delta )
postUpdator(delta); postUpdator(delta);
} }
Vec3 currentPos = getDerivedPosition();
_latestPositionDiff = currentPos - _latestPosition;
_latestPosition = currentPos;
_latestOrientation = getDerivedOrientation();
_timeElapsedSinceStart += delta; _timeElapsedSinceStart += delta;
} }