Wall-impact sparks: test the normal before tuning the glow
A laser impact needs two inputs from the game: a hit position and an outward surface normal. The particle effect should consume those inputs. It should not invent a collision result from a bright spot on a wall. This small Three.js demo uses a fixed planar wall facing positive Z and a synthetic hit at its center. It emits 32 unlit particles and pauses after 18 fixed simulation steps so the…
A laser impact requires two inputs: a hit position and an outward surface normal. A Three.js demo uses a fixed planar wall to emit 32 particles for testing. The particles move in the positive Z direction from an origin just in front of the wall. The source material provides details on emitter settings, particle lifetime, and velocity ranges.
Ensure the normal is correctly transformed from mesh-local to world space, as translating it like a position is a common mistake when dealing with nonuniform scale. Test the simple case before rotating the wall; the outward normal is [0,0,1] in this case. After the burst finishes, remove the effect or reuse it with an explicit ownership policy.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.