# Skate 3 physics engine for Zero
`skate_physics` integrates a reconstructed Skate 3 physics engine into Zero. Use this package for Skate 3-style skateboard and rider physics, or use its custom rigid-body solver components independently. It exposes a reconstructed Skate 3-derived Rust solver through editable entities, components and assets: physical bodies, collision volumes, joints, constraints, motors, forces and simulation state. It is a reusable simulation system, not just a skateboarding controller or a park scene.
## Why use it?
Build and tune connected physical assemblies without first writing the integration between a custom solver and Zero. Inspect velocities and forces, change mass and inertia, configure joint limits, and drive mechanisms with spring/damper or hard motors. Motors apply impulses through the solver rather than teleporting bodies. The general body/joint/drive layer does not require a rider or animation clips.
The package connects physics authoring, fixed-step simulation and entity presentation. Use it to experiment with constrained bodies, motor-driven mechanisms and vehicle assemblies; the skateboard and rider are included applications of the system, not its definition.
## What it provides
- `World`: authority-gated fixed-step simulation and publication of solved entity state.
- `Body` and `CollisionVolume`: editable mass, inertia, forces, velocities, primitive/compound collision geometry and bounded static-mesh collision.
- `Joint` and `Drive`: body references, local frames, linear/angular limits and independently configurable motors.
- `API`: in-engine authoring helpers and an explicit-state solver interface.
- Input and actuator components for device-driven or scripted physical assemblies.
- An integrated skateboard/rider system with control maps, rig mapping, visual bindings and animation-slot overrides.
- Example scenes, a modular park, an authored skateboard, and the `GettingStarted` guide.
## Where to start
Read **GettingStarted** for the distinction between the general physics components and the specialized rider integration. The low-level **Demo** workbench illustrates bodies, joints and a vehicle assembly. **SampleScenes** exposes rider, vehicle-only, self-propelled, scripted-control and physics-tuning examples. The world's default **RiderFidelity** scene demonstrates the coupled rider/board system with Zero's avatar and the authored park.
## Integration boundaries
Static mesh collision has documented size limits; see `Body`. The specialized native rider/board integration requires a fixed body layout; that restriction is distinct from authoring assemblies with the general body/joint/drive API.
The rider demo retains converted reference animations for testing, replaceable through normal Zero assets and animation bindings. These are not required by the general motor component. The default showcase uses the authored skateboard and Zero avatar; unused reference character and board models are excluded from publication. See the component documentation for supported shapes, units and solver-specific conventions.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# StreetSkateboard_825
Original Blender-authored detailed skateboard with deck, trucks and four axle-pivoted wheels. Real-world meter scale, smooth geometry and PBR surfaces. 68 render meshes; 31,036 triangles. See the parent ModularPark README for dimensions and placement.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Native rider controls
The input map sends raw controller values to the full reconstructed controller.
Trick recognition, pop, catch and landing remain in the native behavior pipeline.
Keyboard: W push; X other-foot push; S brake; A/D steer; arrow keys right-stick
directions; hold/release Space for down-to-up ollie; Z/C grab triggers; Q/E
bumpers; F get on/off the board; R reset. Arrow-key flicks can be diagonal.
Gamepad: left stick steer/body; right stick flicks and partial-deflection manuals;
south/west push; east brake; north mount/dismount; triggers grab; bumpers native
modifiers. Touch offers separate steering and trick sticks.
Keyboard right-stick directions are digital. Analog manuals require a controller
or touch stick. These bindings are editable entirely inside Zero.
# Foundry Skatepark
Connected 66x48m industrial courtyard with a banked pump circuit, stair/hubba/bank street sequence, recessed asymmetric shallow/deep skate bowl, vert halfpipe, wallride and optional ledge/manual lines. See ../../Foundry/README.md for the routes and measured rider tests. Detailed visible meshes use separate efficient native collision where needed.
# NativeActorPart
Entity-owned native physical state exchanged with the full rider loop. Role and index identify the part; state contains its complete rates and inertia. Shape/constraint authoring integration is unfinished.
# ZeroSkateActor
Work in progress. Complete reconstructed behavior loop with explicit Zero rig,
animation, graph, geometry and physical-body inputs. This plugin has no load-SKD
or hardcoded reference-scene entry point. `step_entities` consumes seven board
and 26 rider body snapshots and returns solved states plus rendered poses.
Controller/IK histories currently remain on the runtime owner; ownership transfer,
editable constraints and complete live content rebinding are not yet implemented.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# NativeRiderDriver — Skate 3 rider and board integration
Use this component for the integrated Skate 3-derived skating system in Zero. It connects the reconstructed native controller, physics and animation loop to Zero content and NativeActorPart state. Start from Samples.Rider or RiderFidelity rather than attaching a second movement controller to the same bodies.
The driver coordinates board/rider bodies, terrain, inputs, constraints, visual models, rigs and animation bindings. It supports device input and normalized script commands, plus vehicle-only and self-propelled configurations. W/X push, A/D steer, S brakes, Space and the trick stick control tricks, and R recovers the initial setup.
The native coupled layout uses seven board bodies and 26 rider bodies. See GettingStarted for supported joint/motor overrides, rig mappings and animation bindings.
`requestSpawn({x,y,z},heading,pitch?)` reloads the integrated actor at a new finite position with yaw and optional local-X pitch in degrees. The request waits for the pending native step, clears playback/reset, and rebuilds environment inputs; no body teleport or artificial launch force is used. Positive pitch tips local forward down. `spawnPitch` also applies to initial load.
Optional `presentationAdapter` references a module implementing `sample(mapped,mapper,frame,model)`, returning mapped visual rig poses. It runs after native retargeting and foot correction, before animation graph output. It never edits native control poses or solver inputs. Adapter failures surface in `visualError`; callers must not treat visual failure as a valid presentation.
# Private native rider profile
Converted Zero rigs and animations with editable controller/physics documents. No animation-bank or model archive loader.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Texture
Managed texture asset. `data.ztex` is the encoded payload the renderer uploads; compression settings live in `settings.yaml` (`texRef:setSettings({ ... })` to change one).
# Texture
Managed texture asset. `data.ztex` is the encoded payload the renderer uploads; compression settings live in `settings.yaml` (`texRef:setSettings({ ... })` to change one).
# Joint.component
Typed body references, local frames and angular/linear constraint limits.
`separateLinearFrame` enables an independent parent orientation for the three
linear constraint axes: `linearFrameBX/BY/BZ/BW` is a unit quaternion in body B's
authored frame. The angular axes still use `frameBX/BY/BZ/BW`. When disabled,
linear axes follow the angular frame, preserving existing joints. JSON callers
use optional `linear_rotation_b`; omission uses `rotation_b`. Both frames are
converted through the body's mass frame before solving.
The reconstructed character requires this distinction for all22 skeleton joints.
The private121frame reference comparison checks every consumed frame word and
the full96word constraint workspace for all2662joint states. Two unused anchor
padding lanes are excluded from frame-byte comparison (native signed zero there
does not enter the decoder); constraint workspaces still match bit-for-bit.
This verifies joint-frame representation, not complete character simulation.
## Angular modes and independent speed limits
`free` permits all angular directions selected by the joint. Native swing mode 3
is exposed as `hinge`, not `free`: it retains a constrained perpendicular axis.
`limited_hinge` preserves native swing mode 2. Stock board wheel joints explicitly
use `hinge` and retain their original speed allowances.
Angular velocity allowances are independent relative-speed limits in radians per
second. Zero is a zero-speed limit, not an unlimited value. New generic joints
default to 1,000,000 rad/s so an open angular limit does not accidentally act as
a brake. Explicitly authored values (including zero) remain authoritative.
Migration: stock-board definitions using the former `free` spelling for native
mode 3 must use `hinge`. Rebuild the provided scene after changing the kernel and
component together. Old generic joints with explicit zero velocity allowances
must be reviewed; do not overwrite intentional speed limits automatically.
## Native rider slots
A Joint beneath NativeRiderDriver.constraintsRoot may reference two rider
NativeActorPart entities from the same physicsRoot. Set world to that physicsRoot
and nativeRiderSlot to 0..21. readRiderJointDefinitions() on a ready driver returns
the current slot, endpoints, anchors and frames for authoring. Body A is the
native child and body B its parent. Preserve the separate linear frame when
copying definitions. Each slot may have one override; other slots remain native.
nativeRiderAngular defaults to native: mode-dependent normal/ragdoll angular
settings still come from the native owner. Select authored to use this Joint's
angular fields instead. nativeRiderEnabled=false suppresses that slot's rows.
Deleting the override restores the native slot. These edits survive R recovery.
Animation drives remain active and can resist contradictory anchor edits.
Mixed board/rider endpoints are explicitly unsupported by this adapter.
A copied default slot passed the full 520-frame Zero replay unchanged. A 20 mm
anchor edit produced approximately 19.1 mm in the ragdoll test; native mode
limits, authored angular values, disabling, reset and restoration were checked.
# brake
Native rider input.
# Trick stick
Raw native controller input through the Zero input system.
# Left bumper
Raw native controller input through the Zero input system.
# Left grab
Raw native controller input through the Zero input system.
# Left grab analog
Raw native controller input through the Zero input system.
# move
Native rider input.
# Get on/off board
Raw native controller input through the Zero input system.
# ollie
Native rider input.
# Left stick
Raw native controller input through the Zero input system.
# push
Native rider input.
# Push other foot
Raw native controller input through the Zero input system.
# reset
Native rider input.
# Right bumper
Raw native controller input through the Zero input system.
# Right grab
Raw native controller input through the Zero input system.
# Right grab analog
Raw native controller input through the Zero input system.
# Native truck motor
The front or rear motor's native linear/angular drive parameters. Native steering
continues producing its target frame; these fields control how the motor drives
toward it. Disable active to remove its drive response. The actor's separate
animation-controlled hook and rider motors retain their existing behavior.