PhysicsBodyComponent.IsSimulationEnabled Property
Definition¶
Namespace: Brine2D.ECS.Components
When false, the Box2D body is removed from the broad-phase: it stops moving,
stops colliding, and does not appear in queries. All shapes, joints, and body data are
preserved so simulation resumes correctly when set back to true.
Defaults to true.
public bool IsSimulationEnabled { get; set; }
Property Value¶
Remarks¶
This is independent of IsActive. A component can be simulation-
disabled while its entity remains active (e.g. a ghost power-up, a body waiting to
spawn). Setting this to false flushes all active contact and sensor pairs,
firing the appropriate exit events on the next physics tick.