PhysX Vehicle core concepts
This chapter covers the ideas every PhysX Vehicle workflow shares: how contact forces are produced, when the solver runs, and where mass lives.
Raycast suspension model
Each wheel (or tracked road wheel) is a configuration entry, not a PhysX rigid body:
Local anchor ──► ray along suspension dir ──► ground hit
│
├─ spring–damper → normal (suspension) force
└─ tire / track model → longitudinal + lateral forces
│
▼
ApplyLinearImpulseAtWorldPoint (force × sub-step dt)
The chassis collider handles body collision with the world. Wheels contribute forces only through rays; they do not add wheel colliders.
Chassis is the only rigid body
| Role | Where it lives |
|---|---|
| Mass, inertia, linear / angular velocity | PhysX Dynamic Rigid Body on the chassis entity |
| Center of mass (primary) | Rigid Body CoM |
| Extra CoM tweak | Chassis Center of mass offset (applied on activate) |
| Wheel / road-wheel contacts | Ray queries + impulses on the chassis |
Do not parent separate dynamic wheel rigid bodies expecting the vehicle solver to drive them. Visual wheel entities are pose-synced only when Wheel Entity Id is set.
Solve on physics sub-steps
PhysX uses a fixed simulation step. One render frame may run zero or several sub-steps. The vehicle registers:
OnSceneSimulationStart/ related scene simulation hooks for the solve pass- Debug draw on
TickBus(visualization only; forces still land on sub-steps)
Putting drive forces on TickBus alone would desync from PhysX and feel unstable. Prefer VehicleControlRequestBus (or the Drive component) and let the chassis apply impulses each sub-step.
Configuration is Prefab data
Chassis, wheel, drive, and track parameters are serialized on components inside Prefabs. There is no separate .vehicle asset type. Templates (MakeChassisTemplate / MakeTrackTemplate) fill those fields in the editor; they do not create external assets.
Wheeled vs tracked
| Kind | Contact model | Wheel source |
|---|---|---|
Wheeled | Linear tire stiffness + friction circle | Chassis Wheels array (or EnsureDefaultWheels) |
Tracked | Anisotropic track friction (easy roll, strong lateral) | Generated road wheels from PhysX Vehicle Track |
Both share the same chassis host and control / state buses. Tracked mode ignores ordinary car-wheel lists; the Track component pushes geometry into the chassis at activate.
Tire model note
Tire forces use longitudinal / lateral stiffness scaled by load and clamped by friction. Use Magic Formula on the tire config is reserved and unimplemented in the shipped Gem—leave it off.
Mass and gravity
- Set total mass on the Rigid Body to match the template intent (Sedan ≈ 1400 kg, Off-road ≈ 2000 kg, Truck ≈ 8000 kg, Tank ≈ 35000 kg).
- Chassis
Gravity(default 9.81) feeds sprung-mass / auto-stiffness estimation; it does not replace scene gravity. - Lower CoM (Rigid Body and/or chassis offset Z) improves roll resistance; raise Anti-roll stiffness for remaining body roll.
Glossary
| Term | Meaning |
|---|---|
| Chassis | Single dynamic rigid body hosting the vehicle solver |
| Suspension travel | Max compression length along the ray |
| Compression | Current spring compression that drives suspension force |
| Slip ratio / slip angle | Longitudinal / lateral tire kinematic inputs |
| Friction circle | Combined tire force limit from friction × load |
| Ackermann ratio | Blend between parallel steer (0) and full Ackermann (1) |
| Road wheel | Procedural tracked contact ray |
| Differential steering | Turn from left / right track surface-speed difference |
| Sub-step | One PhysX fixed simulation tick |
Next steps
- Wheeled vehicles and Tracked vehicles — authoring and tuning.
- Components — full field tables.