Troubleshooting
Step-by-step Guide
- If there are errors after importing:
- Check that NWH Common and Wheel Controller dependencies are installed and that the samples were imported in the required order. For an upgrade, follow the v14 upgrade notes; do not remove a project folder containing your own vehicles or modifications.
- If the vehicle doesn't work:
- Did VehicleSetupWizard show any errors or warnings (if used)?
- Check the vehicles in the demo scene, do they work?
- If yes, the issue is likely in the setup of the particular vehicle. Continue with the guide.
- If no, check Project Settings > Time and Project Settings > Physics against the Quick Start settings.
- If the vehicle doesn't receive input:
- Check that InputProviders are present, e.g. InputSystemVehicleInputProvider.
- Check that the vehicle is enabled (check-box next to the script name in the inspector).
- Use the Control > Input tab to verify that there is input.
- If the vehicle receives input but doesn't move:
- Check that the wheels don't have SphereColliders or similar on them; only the WheelController should touch the ground.
- Check that the Rigidbody is not constrained or kinematic.
- If the vehicle moves but experiences jitter, jumping, floating, flipping over, etc.:
- Check the model rotation. Guide here.
- Check the vehicle scale, as well as the scale of WheelControllers. Both should be [1,1,1].
- Check that the vehicle has some type of a Collider. It should cover roughly the whole body of the vehicle. This affects internal Rigidbody inertia calculation.
- Check the rotation of WheelControllers; they should face (Z-axis) in the direction of the vehicle.
- Check the Rigidbody center of mass and inertia. Use VariableCenterOfMass if the vehicle needs mass affectors or runtime load changes.
- Check the Center of Mass position through Gizmos. It should be roughly in the center of the vehicle. Too high Center of Mass can cause the vehicle to shake or glide over the surface.
- Check the Inertia value against the mass, dimensions and suspension stiffness. Too little inertia can make the vehicle unstable; arbitrary values copied from a differently sized car can hide the setup problem.
- If the vehicle still doesn't work:
Exporting the vehicle prefab for debugging
For faster debugging sharing the prefab of the vehicle with the developer can be very helpful. This does not require sharing of any of the models, textures, or other assets, just the configuration.
- If a prefab does not already exist, create a prefab from the vehicle by dragging it into the Project view.
- Right click on the prefab and select Export Package...
- Untick Include Dependencies and click Export...
This will result in a prefab containing only the hierarchy and the components and is adequate for debugging, without including its model and texture dependencies. Send the prefab with the bug report, if possible.
Contacting the developer
You can contact me through email or Discord. It is a good idea to include the following in the report:
- Asset version (Window > Package Manager).
- Unity version.
- Any screenshots, videos, etc. demonstrating the behaviour.