Upgrading projects from Unity 4
Unfortunately, the major changes in the physics in Unity 5 makes impossible to directly upgrade a project using Edy’s Vehicle Physics in Unity 4 to work the same in Unity 5.
New projects will be working from the beginning in Unity 5, but projects coming from Unity 4 require an important upgrade process at both scripts and vehicle configuration. Old scripts must be discarded and the vehicles must be re-configured for the new components and settings. The vehicle behavior and gameplay need to be configured and fine-tuned again. However, the new package for Unity 5 has a much better design and vehicles can be composed and configured much faster.
Importing Edy’s Vehicle Physics
- Open your project in Unity 5 (make a backup first!). Wait for the upgrade process to be completed.
- Open the Asset Store, download and import Edy’s Vehicle Physics. You’ll receive the Unity 5 version.
You can have both versions of Edy’s Vehicle Physics in your project at the same time. There might be some GUID collisions at the Assets, but the scripts use different naming and namespaces.
- Edy’s Vehicle Physics 4 is located at the folder EdyVehiclePhysics
- Edy’s Vehicle Physics 5 is imported to the folder EVP5
Upgrading the vehicles
All components of the previous EVP version must be discarded. You may keep them disabled in your vehicles while adding and configuring the new components. Some of the property values of the old components may be reusable in the new components.
Some properties in these components can be used as reference for configuring the new ones:
- CamMouseOrbit, CamSmoothFollow
The parameters of all other scripts have little to no equivalence in the new scripts.
Script correspondence between version 4.x and version 5.x:
|EVP 4||EVP 5||Notes|
|VehicleCameraController||All camera modes are now implemented in this single script|
|CarAntiRollBar||–||Use the property Anti Roll in VehicleController|
|CarExternalInput||–||Any custom script can drive a vehicle|
|CarExternalInputRandom||VehicleRandomInput||Example of a script that feeds the vehicle with random input data|
|CarTelemetry||VehicleTelemetry||Can be added to the VehicleManager object for using a common telemetry component for all managed vehicles.|
|CarVisuals||VehicleTireEffects||Handles tire marks and particle effects (smoke, dust).
Visual wheels are now handled directly in VehicleController.
|–||WheelCollider settings and tire friction are processed in VehicleController.|
|GroundMaterialManager assigns properties to each PhysicMaterial available at the scene.
Each material can use a TireMarksRenderer and a TireParticleEmitter.
|–||VehicleStandardInput||New component for controlling vehicles using the standard Input.
Can be used individually per-vehicle (VehicleController) or together with the VehicleManager component for having the same Input settings in all managed vehicles.
Scripts noted as under development will be added at further package upgrades. Project is being developed right now for bringing all features of the previous version.
Check out the User Guide for learning how to set up the vehicles in the new EVP version.
- The scene “The City – Simple Scene” demonstrates the most simple setup with a single vehicle and the camera.
- The scene “The City – Vehicle Manager” demonstrates how to use a Vehicle Manager object for controlling several vehicles using the same input component.
Configuring the WheelCollider components
You need to re-configure suspension Spring and Damper, as these values have different meaning in Unity 5. A rough rule of thumb for preserving the behavior is:
spring = 4 * unity4spring damper = 15 * unity4damper
Then fine tune these values until getting a similar behavior as in Unity 4. You can leave all other properties of the WheelCollider untouched.
That’s pretty much all I can tell you about upgrading to Unity 5. Feel free to contact me if you need further assistance.
Old EVP4 resources
Archived documentation and resources from Edy’s Vehicle Physics for Unity 4:
- Gallery & Videos
- Live web demo (requires Unity plugin, might not be allowed in your browser)
- Ferrari demo (same)
- Product documentation: guides, reference, tutorials
- Setup, FAQ and forum support