Skip to content

PhysicsBodyComponent.GravityOverride Property

Definition

Namespace: Brine2D.ECS.Components

Overrides the world gravity direction and magnitude for this body in pixels per second squared. When set, world gravity and GravityScale are both ignored for this body; the physics system applies the override as a manual force each fixed-update frame. Set to null to restore normal gravity.

public System.Nullable<System.Numerics.Vector2> GravityOverride { get; set; }

Property Value

System.Nullable<System.Numerics.Vector2>

Remarks

Only affects Dynamic bodies. Kinematic and static bodies are unaffected by gravity regardless of this property. Common uses: ceiling-walkers, per-planet gravity, zero-g zones, directional gravity flips.