PhysX Vehicle wheeled and tracked simulation
Dawn Engine PhysX Vehicle simulates wheeled cars and tracked vehicles on top of PhysX 5 with a raycast suspension model: one dynamic chassis rigid body, per-wheel (or per-road-wheel) ground rays, spring–damper suspension, and tire / track contact forces applied as impulses each physics sub-step.
Maturity: shipped. Provided by the PhysXVehicle Gem; depends on PhysX5, PhysXCommon, and LmbrCentral. After enablement, add chassis (and optional drive / track) components on scene entities that already have a dynamic PhysX rigid body and collider.
It does not use the NVIDIA PhysX Vehicle SDK. Vehicle logic lives in this Gem and drives the chassis through AzPhysics scene queries and impulse APIs.
What problem it solves
Games and industrial sims often need drivable cars, SUVs, trucks, and tanks without building a full jointed suspension or integrating a separate vehicle SDK. PhysXVehicle provides:
- Data-driven wheeled and tracked setups authored in the editor (Prefab-serializable);
- Built-in starter templates (Sedan, Off-road, Truck, Tank);
- Keyboard / gamepad drive helper, plus Lua / Script Canvas control and state buses;
- Optional wheel-mesh pose sync and track UV travel distances for visuals;
- Per-vehicle and global debug draw for suspension rays, contacts, and tire forces.
With the Gem disabled, physics behavior matches a PhysX-only project (no vehicle solver).
How it works
Driving input (Drive component / script / AI)
│
▼
VehicleChassisComponent ──► VehicleSimulation (per fixed physics sub-step)
│ │
│ ├─ Drive / steer / gear → wheel or track targets
│ ├─ Raycast each wheel / road wheel → ground
│ ├─ Suspension spring–damper (normal)
│ ├─ Tire slip forces OR anisotropic track friction
│ └─ ApplyLinearImpulseAtWorldPoint (force × dt)
│
├─ PhysX RigidBody + Collider (mass, CoM, chassis collision)
└─ Optional: wheel / track visual entities (pose / UV sync)
Two rules run through the Gem:
- Chassis is the only rigid body: wheels are not separate physics bodies; they are raycast contact points that push the chassis.
- Solve on physics sub-steps, not TickBus: the solver registers
OnSceneSimulationStart/Finishso forces stay in sync with PhysX fixed-step simulation (a render frame may run multiple sub-steps).
Mass and center of mass live on the PhysX Rigid Body component. Chassis Center of mass offset on the vehicle config is applied on activate; set total mass on the rigid body to match the intended vehicle (for example ~1400 kg for Sedan).
Quick start (summary)
- Enable
PhysXVehicle(Project Manager orproject.json). EnsurePhysX5/PhysXCommonare already enabled. - Chassis entity: Dynamic Rigid Body + Collider → PhysX Vehicle Chassis → Template Sedan → Apply Template → set Rigid Body mass ≈ 1400 kg.
- Optionally add PhysX Vehicle Drive (WASD / gamepad) or write
VehicleControlRequestBusfrom script / AI. - Enter play mode and verify speed with
VehicleStateRequestBus::GetSpeed.
For the full walkthrough and verification checklist, see Getting started.
Handbook chapters
| Chapter | Contents |
|---|---|
| Getting started | Enable the Gem, assemble a wheeled vehicle, drive it, verify telemetry |
| Core concepts | Raycast model, chassis-only rule, physics sub-steps, mass / CoM, glossary |
| Wheeled vehicles | Templates, drive layouts, Ackermann, anti-roll, tuning tips |
| Tracked vehicles | Tank assembly, differential steering, anisotropic friction, UV travel |
| Components | Chassis / Drive / Track fields, services, templates, visual sync |
| Scripting and control | Control / state / notification buses, Lua sample, Script Canvas |
| Debugging | Debug draw, vehicle_DebugDraw, ImGui, troubleshooting |
| Reference | Public includes, API cheat sheet, limits |
Glossary
| Term | Meaning |
|---|---|
| Chassis | The single dynamic rigid body that carries mass and receives all vehicle impulses |
| Suspension | Spring–damper along a ground ray from a local wheel (or road-wheel) anchor |
| Road wheel | Procedural raycast contact point on a tracked vehicle (not a separate rigid body) |
| Tire load | Normal force from the suspension that scales available grip |
| Friction circle | Combined longitudinal / lateral tire force limited by friction × load |
| Ackermann | Inner / outer steer angles that share a turn center (Ackermann ratio blend) |
| Differential steering | Tracked turn from left / right track surface-speed difference |
| Sub-step | One PhysX fixed-step simulation tick; the vehicle solver runs once per sub-step |
Limits and related capabilities
You can rely on:
- Raycast wheeled + tracked simulation on PhysX 5;
- Editor templates and Prefab-serialized configs (not separate vehicle assets);
- Impulse-based forces on the fixed-step simulation loop;
- Scriptable control and state buses (notifications are C++ events).
Do not assume:
- NVIDIA PhysX Vehicle SDK integration;
- Soft tires, aero downforce / drag detail, or full clutch / turbo modeling;
- Pacejka Magic Formula (the field exists but is reserved / unimplemented);
- Enter / exit vehicle gameplay or interior interaction;
- Wheel colliders as separate rigid bodies (rays only);
- Multi-axle truck layouts (the Truck template is a 4-wheel simplification).
Next steps
- Getting started — shortest path to a drivable car.
- Sample script:
Gems/PhysXVehicle/Assets/Scripts/VehicleDriveExample.lua. - Large outdoor levels: pair with World Streaming and double-precision rendering as needed.
Getting started
Enable the PhysXVehicle Gem, assemble a wheeled vehicle, drive it with the Drive component or script, and verify telemetry.
Core concepts
Raycast suspension, chassis-only rigid body, physics sub-step solving, mass and center of mass, and shared terminology.
Wheeled vehicles
Assemble and tune wheeled cars with templates, drive layouts, Ackermann steering, anti-roll, and tire / suspension tips.
Tracked vehicles
Assemble tanks with the Track component, differential steering, anisotropic friction, and track travel for UV scrolling.
Components
Editor and runtime Chassis, Drive, and Track components: services, templates, and configuration field tables.
Scripting and control
Drive vehicles from C++, Lua, and Script Canvas with control and state buses; understand notification limits.
Debugging
Enable suspension and tire force draw, use vehicle_DebugDraw, optional ImGui telemetry, and troubleshoot common failures.
Reference
Public includes, API cheat sheet, limits, sample assets.