LOCKSTEP PHYSICS FOR .NET

Make every frame agree.

Gravitas brings fixed-point bodies, colliders, collision response, constraints, queries, replay hashes, and diagnostics together inside explicit world contexts.

Build an explicit physics world

Own the runtime

Keep clocks, services, bodies, colliders, queries, replay state, and diagnostics isolated inside one context per simulation.

Choose the dimensions

Run pure 2D, pure 3D, both without cross-contacts, or an explicit mixed 2D/3D collision model.

Author the shapes

Build runtime geometry from primitives, convex or concave meshes, compounds, materials, and engine-neutral shape definitions.

Simulate, query, and observe

Connect bodies

Use deterministic 2D and 3D joints, motors, limits, ragdoll definitions, and context-owned solvers.

Ask the world

Raycast, overlap, sweep, batch, and reduce 2D, 3D, or mixed hits with stable ordering and caller-owned buffers. Native 2D support probes apply physical collision policy before selecting a surface.

See the physics

Project events, counters, contacts, query details, and debug-draw data into host tools without adding a renderer to the core.

Package family

Package Serialization profile
Gravitas Standard package with built-in MemoryPack support
Gravitas.Lean Same core physics API without the direct MemoryPack runtime dependency

Both variants target netstandard2.1 and net10.0.

Part of the LSF ecosystem

Gravitas builds physics policy on focused lower layers:

  • FixedMathSharp for deterministic fixed-point math, transforms, and full-domain geometry.
  • SwiftCollections for low-allocation collections, pools, and spatial structures.
  • GridForge for explicit voxel worlds, traversal, and physics-partition backing.
  • Chronicler for deterministic state transfer, wide simulation timing, and replay infrastructure.

Trailblazer provides character controller and navigation systems in the same ecosystem.

Guides

  • Getting Started — Set up a world, push a sphere, and read its position after one step.
  • Technical Overview — Follow that sphere across the host and physics boundary.

Build the runtime

Understand collision

Query and observe it

  • Query Services — Choose a raycast, overlap, sweep, all-hit query, or batch.
  • Query Reference — Check hit geometry, filtering, ordering, and reentrancy.
  • Diagnostics — Read events and counters or collect debug-draw commands.
  • Diagnostic Adapters — Feed diagnostics into a renderer, structured log, or replay timeline.

Resources

The API reference is generated from the library's XML documentation. The guides explain lifecycle ownership, dimensional models, collision, queries, serialization, replay, and diagnostics in task-oriented prose.