Skip to content

ParticleEmitterComponent.SimulateInLocalSpace Property

Definition

Namespace: Brine2D.Systems.Rendering

When true, particles are simulated in local space relative to the emitter entity. Moving the entity moves all live particles with it. Useful for exhaust trails, auras, and effects that should remain attached to a moving object. When false \(default\), particles are simulated in world space and drift freely after spawn.

Velocity direction: when local-space simulation is active, Brine2D.Systems.Rendering.ParticleEmitterComponent.InitialVelocity is treated as a local-space direction — it is not rotated by Rotation at spawn time. This means particles always travel in a fixed direction relative to the entity's local axes. If you need velocity to follow the entity's world rotation instead, set SimulateInLocalSpace to false and use VelocityInheritance to carry the entity's momentum.

Note: if the entity's Scale changes after particles have already spawned, all live particle positions will appear to stretch or compress relative to the entity origin, because positions are multiplied by localScale each render frame. Avoid animating scale on entities that use local-space particle simulation with live particles.

C#
public bool SimulateInLocalSpace { get; set; }

Property Value

System.Boolean