Merge pull request #6521 from boyu0/particle_yCoordFlipped_bug

Fix ParticleSystem yCoordFlipped bug.
This commit is contained in:
minggo 2014-04-30 17:03:01 +08:00
commit 0dff539a18
1 changed files with 8 additions and 15 deletions

View File

@ -725,21 +725,14 @@ void ParticleSystem::update(float dt)
tmp = radial + tangential + modeA.gravity;
tmp = tmp * dt;
p->modeA.dir = p->modeA.dir + tmp;
if (_configName.length()>0)
{
if (_yCoordFlipped == -1)
{
tmp = p->modeA.dir * dt;
}
else
{
tmp = p->modeA.dir * -dt;
}
}
else
{
tmp = p->modeA.dir * dt;
}
if (_configName.length()>0 && _yCoordFlipped == -1)
{
tmp = p->modeA.dir * -dt;
}
else
{
tmp = p->modeA.dir * dt;
}
p->pos = p->pos + tmp;
}