Quick answer: Set the VFX Graph emitter’s Simulation Space to Local. Particles then transform with the parent each frame.
A flame effect attached to a player’s hand should move with the hand. Player walks; the flame stays at the original position while the player walks forward. Particles look fine relative to where they spawned, but the system doesn’t follow.
Simulation Space
VFX Graph emitter blocks have a Simulation Space property:
- Local: particle positions are relative to the parent transform. The whole system moves with the parent.
- World: particle positions are world-space. Once spawned, they live in world space; the parent moving doesn’t affect them.
For attached flames, Local is what you want. For falling sparks that should stay in world space, World.
The Fix
Open the VFX Graph asset. Click the emitter. In the Inspector, find the Initialize block’s Simulation Space (or the global System Simulation Space). Set to Local. Save the graph.
Initialize Particle:
Simulation Space: Local
Particles now move with the parent transform. The VisualEffect GameObject should be a child of the moving entity.
World Space for Trails
For rocket exhaust trails:
- Simulation Space: World.
- Initial Velocity: relative to parent direction.
Trail particles spawn at the rocket’s current position but linger in world space, creating the visible trail.
Exposed Position for Decoupled Targets
If the effect can’t be a child of the target (cross-scene reference), expose a Vector3 property and update from script:
visualEffect.SetVector3("TargetPos", target.position);
In the graph, use this property to position the emitter. Tradeoff: per-frame property write costs more than Local space inheritance.
Verifying
Walk the player around. The flame should stay glued to the hand. Detach the VFX from the parent; flame stays in place. Reattach with Local space; follows correctly.
“Local for attached effects, World for trails. The choice maps directly to player perception.”
When in doubt, use Local — most game effects feel correct when attached to their source.