Table of Contents

Class GravitasPhysicsService

Namespace
Gravitas
Assembly
Gravitas.dll

Owns physics registration and collision-pair state for one GravitasWorldContext.

public sealed class GravitasPhysicsService
Inheritance
GravitasPhysicsService
Inherited Members

Constructors

GravitasPhysicsService(GravitasWorldContext)

Initializes a new physics service for the supplied context.

public GravitasPhysicsService(GravitasWorldContext context)

Parameters

context GravitasWorldContext

The owning world context.

Properties

BodyCount

Gets the number of dynamic bodies currently registered in this context.

public int BodyCount { get; }

Property Value

int

ColliderCount

Gets the number of colliders currently registered in this context.

public int ColliderCount { get; }

Property Value

int

LastContinuousCollisionIslandCount

Gets how many service-owned continuous-collision handoff batches were consumed during the last late step.

public int LastContinuousCollisionIslandCount { get; }

Property Value

int

LastContinuousCollisionIslandIterationCount

Gets how many service-owned continuous-collision handoff iterations were consumed during the last late step.

public int LastContinuousCollisionIslandIterationCount { get; }

Property Value

int

LastContinuousCollisionIslandLimitReached

Gets whether the service-owned continuous-collision handoff queue hit its deterministic iteration cap.

public bool LastContinuousCollisionIslandLimitReached { get; }

Property Value

bool

PeakColliderCount

Gets the highest collider ID allocated in this context.

public int PeakColliderCount { get; }

Property Value

int

SimulatePhysics

Gets or sets whether this context should simulate physics.

public bool SimulatePhysics { get; set; }

Property Value

bool

Methods

LateSimulate()

Runs this context's late physics step.

public void LateSimulate()

Reset()

Clears all context-local physics registration state.

public void Reset()

Simulate()

Runs this context's physics simulation step.

public void Simulate()

TryGetColliderById(int, out LSCollider?)

Resolves a context-local collider ID.

public bool TryGetColliderById(int id, out LSCollider? collider)

Parameters

id int

The context-local collider ID.

collider LSCollider

The resolved collider, if present.

Returns

bool

True when the ID resolves in this context.

Visualize()

Publishes interpolated presentation state for registered 3D bodies.

public void Visualize()