Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
dumganhar committed Jan 10, 2025
1 parent 0b94dbe commit a217b39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cocos/particle/particle-system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ export class ParticleSystem extends ModelRenderer {
const thisCurPos = self._curPos;
const thisOldPos = self._oldPos;

if (!self._curPos.equals(self._oldPos) && self._boundingBox && self._culler) {
if (!thisCurPos.equals(thisOldPos) && self._boundingBox && self._culler) {
const dx = thisCurPos.x - thisOldPos.x;
const dy = thisCurPos.y - thisOldPos.y;
const dz = thisCurPos.z - thisOldPos.z;
Expand All @@ -1198,7 +1198,7 @@ export class ParticleSystem extends ModelRenderer {
center.y += dy;
center.z += dz;
self._culler.setBoundingBoxCenter(center.x, center.y, center.z);
thisOldPos.set(self._curPos);
thisOldPos.set(thisCurPos);
}

const renderScene = self.node.scene.renderScene;
Expand Down

0 comments on commit a217b39

Please sign in to comment.