Merge pull request #7585 from wagulu/patch-1

Update CCParticleSystem.cpp
This commit is contained in:
minggo 2014-07-28 10:54:05 +08:00
commit 7ad7b5b3f7
1 changed files with 6 additions and 1 deletions

View File

@ -771,7 +771,12 @@ void ParticleSystem::update(float dt)
Vec2 newPos;
if (_positionType == PositionType::FREE || _positionType == PositionType::RELATIVE)
if (_positionType == PositionType::FREE)
{
Vec2 diff = convertToNodeSpace(currentPosition) - convertToNodeSpace(p-> startPos);
newPos = p->pos - diff;
}
else if(_positionType == PositionType::RELATIVE)
{
Vec2 diff = currentPosition - p->startPos;
newPos = p->pos - diff;