mirror of https://github.com/axmolengine/axmol.git
Merge pull request #7585 from wagulu/patch-1
Update CCParticleSystem.cpp
This commit is contained in:
commit
7ad7b5b3f7
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue