@zaisma/physics
Physics that works as it's added, alone and online, for every kind of game: one world of bodies (moving, kinematic or fixed), ground for big outdoor maps, joints, wheeled vehicles, seats, collision layers and queries, with characters that move by the game's own rules. Rapier is the engine, shipped inside.
- Kind
- Foundation
- Built on
- @zaisma/standard
- Version
- 2.1.0
- Licence
- MIT, open source
- By
- btc7274
- Rated
- No ratings yet
ShellCopied
npx @zaisma/cli pieces add @zaisma/physicsWhat it needs
Nothing: it stands on its own.
Fits is said only for what Zaisma ran together. Not tested means nobody at Zaisma has.
Settings and hooks
Everything a game can change without editing the piece, so it moves to a newer version and keeps the game's changes.
- gravity_m_per_sec_per_secHow fast things fall, in metres a second each second: 9.81 is Earth's. Online, whoever runs the world decides it.Number, 0 to 100, starts at 9.81Setting
- bounce_pctHow much of a hit's speed comes back, for bodies that don't say their own.Number, 0 to 100, starts at 10Setting
- grip_pctHow much surfaces hold on (friction), for bodies that don't say their own.Number, 0 to 300, starts at 70Setting
- walk_speed_m_per_secHow fast the piece's walking characters walk; running is 1.8 times this. A character kind of the game's own reads it too, as tuning.walkSpeedMPerSec.Number, 0 to 40, starts at 4.5Setting
- jump_height_mHow high the piece's walking characters jump, whatever the gravity.Number, 0 to 20, starts at 1Setting
- character_mass_kgHow heavy a character is beside what it walks into and pushes.Number, 1 to 1000, starts at 70Setting
- before_put_backWhere the world is run, asked before something that fell out of the world is put back, with the place it started ({ id, isCharacter, roomState }); answer another place as { x, y, z } to put it there.Decision
- body_hitTold when a moving body hits something hard enough to hear, with { bodyId, otherBodyId, otherCharacterId, speedMPerSec }: for a thud, dust or a rumble.Event
None.
Versions
- 2.1.0Nov 30, 2026 · 21 files · 2.2 MB · 14 files changed since 2.0.0Newest
- 2.0.0Nov 30, 2026 · 19 files · 2.1 MB · 14 files changed since 1.0.0
- 1.0.0Nov 29, 2026 · 17 files · 2.1 MB
No version has passed its checks yet.







