Skip to content

Physics

Yahasi edited this page Jul 6, 2026 · 3 revisions

🌐 English · Русский

← Home · World Format →

Physics

Nova has a real rigid-body physics layer — a unified impulse-based constraint solver (sequential impulse / PGS over a contact manifold, warm-started, with friction, rolling friction, restitution, split-impulse positional correction and sleeping islands). It gives believable gravity with angle-of-incidence, inertia, rolling, bouncing, spin, solid stacks and emergent tumbling — not a scripted fall.

Two world-level master switches, both set when you create a world (and editable in the JSON — see World Format):

Collision (on by default)

The master switch for solid objects.

  • The player (a camera bubble) is pushed out of the floor and any collider, so you can't walk or fly through them.
  • Each mesh can use a fast AABB box collider or an OBB oriented box that hugs a tilted shape (box-box contacts use a full 3D Separating-Axis test).
  • Each object has its own Collide flag; when the world switch is off, every object's Collide is forced off and locked.

Gravity (off by default)

Turns on the simulation:

  • The player becomes a walking character: gravity pulls the camera down, it stands on surfaces, Space jumps, and F1 toggles a free-fly mode for building.
  • Any object can opt into Gravity — meshes, primitives, spheres, even a light or the platform fall and rest on whatever is beneath them.
  • A falling ball collides with the real surface it lands on — the actual triangles of a pyramid / ramp / mesh, not its bounding box — so it rolls down a slope with real momentum (faster on steeper inclines), coasts to a stop on the flat, and bounces by its restitution. A falling mesh likewise rests on the real surface under it.
  • Boxes rest, slide or topple on the real surface — never flung. A box dropped on a ramp settles flat on the slope and slides or tumbles down it; it is not ejected sideways (it collides with the mesh's real triangles, not its bounding box). Whether it slides or tumbles depends on the slope steepness and friction: a shallow slope just slides, a steep face / an off-balance box topples over its edge and rolls edge-to-edge down — all emergent from the solver.
  • Everything collides with everything, and boxes STACK. Boxes and balls collide in every combination (box-box, ball-box, ball-ball), mass-weighted, so a tower of boxes stands solid (no jitter, no lean, no sink) and a ball fired into it scatters the tower — and the whole pile then settles and sleeps together (as one island).
  • Rolling friction — a rolling ball and a tumbling box slow down and come to rest instead of rolling forever, while still rolling down a slope (gravity beats the small rolling resistance). Tunable per object.
  • Restitution (Bounce) is set per-world (Create dialog) and per-object: 0 = dead stop, 1 = perfectly elastic. On a contact the two surfaces' bounciness combine (geometric mean), so a springy ball on a dead floor differs from one on a "trampoline" wall.
  • Friction, mass and 3D rotation — objects shed speed to friction (Coulomb + rolling), a heavier object is shoved less (per-object Mass), and an off-centre hit makes a body tumble — full 3D spin with a proper inertia tensor and drift-free quaternion orientation.
  • The simulation substeps internally, so it behaves the same whether the terminal renders at 60 FPS or only a few, with safety rails so nothing flies off.

Per-object physics fields

Each object carries its own tunables (edit them live in the Inspector, or in the world JSON):

  • Collide — is this object solid (effective only when the world's Collision is on).
  • Gravity — is this object pulled down (effective only when the world's Gravity is on; default off).
  • Collider — a mesh's collider shape: AABB (fast world-axis box) or OBB (oriented box that rotates with the object, hugging tilted/elongated shapes).
  • Mass — impulse-solver mass (default 1); a heavier object is shoved less in a collision.
  • Bounce (restitution) — 0–1; -1 inherits the world's default. On a contact the two surfaces' values combine.
  • Friction — Coulomb friction coefficient (μ, default 0.5).
  • RollFric — rolling-friction resistance (default 0.05) so a rolling ball / tumbling box comes to rest.

Networking

Object physics is simulated by the authority/solo and each moved body's full state — position, orientation and velocity — is streamed to clients, which dead-reckon and smoothly ease toward it, so everyone sees objects fall, roll and tumble in sync (not frozen between updates); the player's own gravity runs locally for every peer, so nothing desyncs. See Multiplayer.

Clone this wiki locally