I’ve spent the past weeks working intensely on organizing files, refactoring code and writing documentation for moving VPP to the Beta stage. The project is already mature and bug-free enough to be used in actual projects. Only some features are yet to be developed. Main code is not expected to have significant changes during the Beta phase.
Early Access to Vehicle Physics Pro Beta is still available with the Professional and Enterprise licenses. Check out the Licensing page for more information.
Upgrading existing projects to Beta stage
Early Access users, this is of interest to you!
If your scenes use the provided components only, then changes won’t likely affect you. Some classes and properties have changed its name, but the properties will conserve their serialized values. Just fetch and checkout the master branch from the repository and everything should work without errors.
If you are accessing VPP components via scripting, or extending VPP with your custom components, blocks or controllers, then you will surely receive a lot of errors when checking out the master branch. Review the following change list and verify the reported errors for the proper corrections. As always, feel free to contact me at email@example.com or @VehiclePhysics if you encounter any problem.
New VehiclePhysics namespace
Classes in VPP now belong to the namespace VehiclePhysics. When referencing VPP classes, you should add using VehiclePhysics; at the top of your scripts.
This doesn’t apply to the exposed Unity components such as VPVehicleController, VPWheelCollider, etc. These conserve the VP prefix in their class names at the root namespace. The reason is that Unity doesn’t support menu entries for components included in a custom namespace.
Functional blocks and custom vehicles
The concept of Component as parts of the powertrain, such as engine or gearbox, is now named Block. Old prefixes “VP” and “VPC” are now removed, as the blocks deriving from VehiclePhysics.Block and other classes are now defined under the namespace VehiclePhysics as well. This removes the ambiguity among the “vehicle components” and the standard Unity components.
VPComponent --> VehiclePhysics.Block VPVehicleBase --> VehiclePhysics.VehicleBase VPWheel --> VehiclePhysics.Wheel
VPCEngine --> VehiclePhysics.Engine VPCGearbox --> VehiclePhysics.Gearbox VPCDifferential --> VehiclePhysics.Differential ...
The method DoUpdateComponents of VehicleBase has been renamed as well:
VPVehicleBase.DoUpdateComponents() --> VehiclePhysics.VehicleBase.DoUpdateBlocks()
Other refactored names
The classes and properties for “Transmission” are now named Driveline, as it fits better with the intended usage.
Some properties have changed their name. They will still receive the serialized settings for the previous ones, but if you are accessing these properties from scripting you will receive an error. Simply find out the new name in the VPP code and adopt it in your code.
Some definitions and properties that have changed:
ClutckPack --> DiscFriction (clutch type) TireFriction.Type --> TireFriction.Model VPVehicleController.transmission --> VPVehicleController.driveline VPStandardInput.unlockTransmissionOnHandbrake --> VPStandardInput.unlockDrivelineOnHandbrake CameraMode.MouseOrbit --> CameraMode.Orbit VPCameraTargetConfig --> VPCameraTargetSetup
The VPTelemetry GUI is easier to configure: only the Font is required now (no GUIStyles anymore). New instances will have VeraMono configured by default, but the existing instances of VPTelemetry will surely require you to configure the Font manually. The recommended font is VeraMono.