From 10f51f176a32f2d0d722a57b938192179315ec19 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 24 Dec 2024 15:36:09 -0800 Subject: [PATCH] missed cleanup --- src/ZeldaWindWaker/d_particle.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ZeldaWindWaker/d_particle.ts b/src/ZeldaWindWaker/d_particle.ts index b8bd1ec11..e80a703b6 100644 --- a/src/ZeldaWindWaker/d_particle.ts +++ b/src/ZeldaWindWaker/d_particle.ts @@ -73,11 +73,10 @@ export class dPa_control_c { const inc = viewerInput.deltaTime / 1000 * 30; // Some hacky distance culling for emitters. - getMatrixTranslation(scratchVec3a, viewerInput.camera.worldMatrix); for (let i = 0; i < this.emitterManager.aliveEmitters.length; i++) { const emitter = this.emitterManager.aliveEmitters[i]; const cullDistance = (emitter as any).cullDistance ?? 5000; - if (vec3.distance(emitter.globalTranslation, scratchVec3a) > cullDistance) { + if (vec3.distance(emitter.globalTranslation, globals.camera.cameraPos) > cullDistance) { emitter.stopCalcEmitter(); emitter.stopDrawParticle(); } else {