Skip to content

Commit

Permalink
fix orbitOverLife memorization
Browse files Browse the repository at this point in the history
  • Loading branch information
Alchemist0823 committed Jul 1, 2024
1 parent b9a1c5c commit a01881f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/quarks.core/src/behaviors/OrbitOverLife.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ export class OrbitOverLife implements Behavior {
}

initialize(particle: Particle): void {
this.orbitSpeed.startGen((particle as any).orbitOverLifeSpeed);
this.orbitSpeed.startGen((particle as any).memory);
}

update(particle: Particle, delta: number): void {
this.temp.copy(particle.position).projectOnVector(this.axis);
this.rotation.setFromAxisAngle(
this.axis,
this.orbitSpeed.genValue((particle as any).orbitOverLifeSpeed, particle.age / particle.life) * delta
this.orbitSpeed.genValue((particle as any).memory, particle.age / particle.life) * delta
);
particle.position.sub(this.temp);
particle.position.applyQuaternion(this.rotation);
Expand Down

0 comments on commit a01881f

Please sign in to comment.