UniCar is a Unity 5-based vehicle physics setup that uses built-in Unity components and custom C# scripts to allow control of a variety of different vehicle types.
UniCar is a system set up with simplicity in mind. This isn't a scientifically accurate physics simulation of real world car handling or tire frictions. This was designed with arcade style driving games in mind, parking games, arena combat games and the like. If you're going for the next Gran Turismo this isn't the package for you. If you want something similar to how vehicles behave in Grand Theft Auto, this is right up your alley!
Is UniCar a good fit for my project?
No you do not. This system uses all out-of-the-box Unity components such as Box Colliders, Rigidbodies and Wheel Colliders. You don't need any fancy plugins or special physics settings. The system is setup to be drag and drop into a default Unity project and simply work.
Do I need something special in Unity 5 for this to work?
UniCar is set up to allow (4) different vehicle physics types.
What types of vehicles can I set up with UniCar?
Light Vehicle Class - Lighter weight vehicles (small dune buggy in the prefab samples)
Medium Vehicle Class - Medium weight vehicles (sedan vehicle in the prefab samples)
* All around middle ground, average steering response, average weight, average acceleration.
Heavy Vehicle Class - Heavy weight vehicles (semi-rig vehicle (cab only) in the prefab samples)
* Heavy physics distribution, slower steering response, more torque damping.
Monster Truck Class - Monster truck sized vehicles (monster truck vehicle in the prefab samples)
* Very bouncy physics, fast steering response, light weight = good torque, fast acceleration.
UniCar gives the developer the following features for the provided prefabs.
What features do I get with UniCar?
The Car Controller - This is the master component that drives all of the physics and input for each car. You have the ability to set custom torque (engine power to the wheels), braking power, steering sensitivity, the suspension height for rear and front wheels, the spring intensity and spring damping rate, the tire grip for the front and rear wheels, the downforce applied to the vehicle as it accelerates and the ability to move the Center of Gravity into any position.
The Stabilizer - This component stabilizes each vehicle as it's in the air, it also contributes to stabilization while the vehicle is grounded. It has two simple settings, the stabilization amount you require (0 - 1), with 1 being full stability. The second setting is for determing how rapidly you'd like the vehicle to stabilize via a speed property. This will allow for rapid stabilizing or allowing the vehicle to gently roll forward or backwards a bit before leveling out.
Max Speed Limit - This component will allow you to set a custom top speed for any vehicle. It has very simple properties that allow you to simply type in the maximum velocity you would like a vehicle to have. Once a vehicle has this component on it, it will not exceed the max speed you've set for it.
The Audio Controller - This component controls all audio coming from the vehicle. This includes the sound of engine acceleration and RPMs, tire slippage sounds, sounds due to impact with other objects, such as environmental objects or other vehicles, and ambient road and wind sounds as the vehicle's velocity increases. This component also intelligently detects the surface type it is driving over and plays specific audio for different surfaces. Currently the audio controller supports asphalt, dirt, grass and water surface types.
The Wheel Aligner - This component is responsible for aligning the visual (3d model) wheels to the Unity WheelColliders and ensuring that the visual art wheels rotate properly on all axises. It also controls the emission of particle FX for wheel slippage over different surfaces. The wheel alignment component is intelligent and can detect which type of surface the wheel is currently sliding over, and in turn emit the proper visual FX. Currently the wheel aligner supports asphalt, dirt, grass and water surface types.
Vehicle Camera Follow - This component is responsible for tracking your game camera behind the player vehicle. It includes settings for rotation and distance damping, each influenced by the speed of the vehicle's rigidbody. The camera follow components speed damping property allows the camera to "zoom in" or "zoom out" based on speed, allowing for a great sense of speed.