Physical-body configuration for a Sphere or Box entity.
Signature
type RigidBody {
kind: Str = "dynamic";
mass: Number = 1;
velocity: Vec3 = Vec3 {};
angular_velocity: Vec3 = Vec3 {};
restitution: Number = 0.3;
friction: Number = 0.5;
}kind must be dynamic, fixed, or kinematic. Only dynamic bodies accept Force or Impulse; fixed bodies must have zero velocities.
Fields
Examples
Advance a dynamic sphere
Systems run before physics in each fixed tick, so the second callback observes the position advanced by the first integration step.
Press Step 2 times to reach the checked result.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
true
Choose a fixed body
Fixed bodies keep zero velocity.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
fixed
Rust definition
Interpreter RecordValue physics schema consumed by the Rapier-backed spatial adapter.