---
title: "onephysics docs"
url: https://recursiveai.org/onephysics/docs/
description: "Everything about OnePhysics: getting started, the three tiers, events, queries and layers, rollback and lockstep, determinism, units and limits, soft…"
version: "0.4.0-preview.1"
---

# onephysics docs

Everything about OnePhysics: getting started, the three tiers, events, queries and layers, rollback and lockstep, determinism, units and limits, soft bodies, and coming from Unity. OnePhysics is a preview: 0.4.0-preview.1.

## Start

- [Getting started](https://recursiveai.org/onephysics/docs/getting-started/index.md): Install the OnePhysics preview for .NET 10, drop a ball on the ground, walk a character, cast a ray, and take a snapshot and a world hash, with the same…
- [Overview](https://recursiveai.org/onephysics/docs/overview/index.md): Deterministic 2D rigid-body physics for .NET, written from first principles: the same world state, bit for bit, on every platform, CPU, vector width and…
- [Install](https://recursiveai.org/onephysics/docs/install/index.md): The package id is RecursiveAI.OnePhysics. Its only dependency is RecursiveAI.OneMath (the deterministic vectors and functions the API is written in…
- [Quick start](https://recursiveai.org/onephysics/docs/quick-start/index.md): The namespaces you import: RecursiveAI.OneMath for the vector types, RecursiveAI.OnePhysics for what both dimensions share (BodyType, EventKind…
- [The three tiers](https://recursiveai.org/onephysics/docs/tiers/index.md): Each tier is built on the one below, so you can start at the top and drop down for one object without rewriting the rest.

## Building a world

- [Events](https://recursiveai.org/onephysics/docs/events/index.md): A step produces events: contacts beginning and ending, sensor overlaps, sleeping and waking, joint breaks. They are collected during the step and…
- [Queries and layers](https://recursiveai.org/onephysics/docs/queries-and-layers/index.md): Every shape has a layer, 0 to 31 (ShapeDef.Layer; body.Layer reads the first shape's layer and sets all of them, as Unity's per-object layer does). The…
- [Units and sizes](https://recursiveai.org/onephysics/docs/units/index.md): The full list of conventions, including handles and joint names, is in names and conventions.
- [Input limits](https://recursiveai.org/onephysics/docs/limits/index.md): Inputs outside these limits are refused with a typed error that names the value and the limit; nothing is changed when an operation refuses.
- [Names and conventions](https://recursiveai.org/onephysics/docs/api-names/index.md): One place for the choices a host has to know. The two worlds (PhysicsWorld2D, PhysicsWorld3D) share every name here; only the math types differ.

## Rollback and determinism

- [Rollback and lockstep](https://recursiveai.org/onephysics/docs/rollback/index.md): A rollback host runs the same fixed-dt simulation on every peer, keeps a ring of recent snapshots, and when a late input arrives restores an old frame and…
- [Determinism](https://recursiveai.org/onephysics/docs/determinism/index.md): The repository's hash-matrix tool steps its scenes and compares the per-step world hash across x64 and arm64, scalar and every vector width, one thread…

## 3D preview

- [Soft bodies](https://recursiveai.org/onephysics/docs/soft-bodies/index.md): Cloth, rubber and jelly in the 3D world (a preview, like the rest of Physics3D: #pragma warning disable OPHYS0002). A soft body is a mesh of particles…

## Coming from Unity

- [Coming from Unity](https://recursiveai.org/onephysics/docs/unity-mapping/index.md): OnePhysics uses Unity's vocabulary for the happy path where it can, with these differences: there are no GameObjects, so the Body is the thing you hold…

## Reference

- [Guide map](https://recursiveai.org/onephysics/docs/guide/index.md): Task-oriented pages with examples that are compiled and run by the test suite. For the exact members, read the XML documentation in your editor. The…
- [Changelog](https://recursiveai.org/onephysics/docs/changelog/index.md): What changed for hosts in each preview, newest first. "Moved results" lists the changes that alter a world's state after the same inputs (and so its…

## Cookbook

- [All recipes](https://recursiveai.org/onephysics/cookbook/index.md): 5 short, task-first recipes with complete code.
