Edy's Vehicle Physics
Physically realistic, stable and fun vehicle physics in Unity / PhysX
Live demo: http://www.edy.es/unity/offroader.html
Documentation: http://projects.edy.es/trac/edy_vehicle-physics/wiki/WikiStart
Videos: http://www.youtube.com/user/EdyJ#grid/user/B7AEBA14B84643F2
4 vehicles: Pickup / GTA4-Pickup / Bus / Sport Coupe (select with PgUp / PgDown).
Driving aids. Vehicle damage. Visual tire effects.
Based on Unity's standard WheelCollider component:
- Realistic behavior with extremely low CPU cost, as everything is handled directly from the PhysX core.
- Suitable for iPhone, mobile devices, and low-end systems.
- Can handle dozens of physically active vehicles in the same scene at effective CPU cost.
- Wheel's friction curves can be adjusted on the fly and get the result in the game instantly.
- Telemetry shows the friction curves and the wheel's slip rate in realtime, which allows rapid fine-tunning (B then shift-B, see pic).
- Realistic suspension: spring, damper, stabilizer bar, weight transfers.
Focused on gameplay, simplicity and efficiency:
- Features motor power, brake power, steering angle, anti-roll, traction balance (front, rear, or anything in between), brake balance, sideways grip balance (controls oversteer / understeer), aerodynamic drag, max speed...
- Driving aids: ABS limits the brake power, TC limits the motor power, ESP limits the steering angle with speed.
- Stabilizer (anti-roll) bars control the chances of the car to flip over.
- Visual effects: skidmarks, realistic tire smoke and burnouts.
- Fully customizable car damage (min force, max deformation, impact radius...) that also affects the wheels and handling.
Easy to use and integrate in any project:
- Car physics core consists in three small script files (less than 1000 lines together).
- A brand new car can be up and running from scratch (no prefabs) in two minutes.
- Additional script files available for other features (car settings, car cameras, telemetry, etc.)
- Exposes as few parameters as possible, each one with specific and predictable effect in the car's handling & behavior (less parameters means easier to configure the gameplay).
- Can simulate a broad range of four wheeled vehicles (city car, offroad, pickup, truck, bus, sports car, racing car...) with more to come.
Terms & Conditions (code only):
- Use for unlimited time, any number of projects, royalty-free.
- Keep the copyright notices on top of the source files.
- Resale or redistribute as anything except a final product to the end user (asset / library / engine / middleware / etc.) is not allowed.
- Put me (Angel Garcia "Edy") in your game's credits as author of the vehicle physics.
Bug reports, improvements to the code, suggestions on further developments, etc are always welcome.
Unity forum user: Edy
Email: edytado@gmail.com
City scenery provided by ikiman under his conditions. Not for commercial purposes.
Vehicles (except the L200) provided by LuckyMountain. Not for commercial purposes.
The Mitsubishi L200 is a free model available at 3D repositories on the web.