NWH Vehicle Physics 2 Documentation
Docs » FAQ

FAQ

Before going through this troubleshooting guide please check that you have the latest version of the asset. This can be done through Window > Package Manager.

Vehicle physics is behaving weirdly (jitter, jumping, etc.).

  • Check the model rotation as per this guide.
  • Check the model scale. The root object of the vehicle and WheelControllers should have a scale of [1,1,1].

Vehicle is not reacting to the input.

  • Check that there is a VehicleInputProvider and a SceneInputProvider script present in the scene. The full name will depend on the input method used, e.g. RewiredVehicleInputProvider or InputSystemVehicleInputProvider.
  • Check that the vehicle is enabled during play mode. This can be checked through the tick-box next to the VehicleController script name in the inspector.
  • Check that the vehicle is receiving input by clicking on VehicleController ⇒ Control ⇒ Input. The values there should react to user input if the vehicle and the InputHandler are enabled.

How to make the vehicle feel more arcade?

NWH Vehicle Physics 2 is by default set up more towards realism / simcade style of vehicles and tries to be as physically accurate as possible. However, sometimes games require a more arcade approach. Here are a few tweaks to get more arcade behavior:

  • Adjust Lateral Slip Coefficient of WheelController to a lower value, e.g. 0.5 or 0.7. This will reduce the tendency of the vehicle to snap oversteer and in general lose traction.
  • Adjust Longitudinal Slip Coefficient of WheelController to a lower value. This will make wheel spin less likely to happen with short bursts of torque (e.g. gear changes).
  • Adjust Slip Circle Shape of WheelController to 1. This will make wheel spin have less influence on the lateral grip, however, it will be harder to do powerslides.
  • Set the center of mass to be a bit lower than realistic, e.g. a few centimeters above the floor of the vehicle. This will reduce leaning in the corners.
  • Reduce VehicleController > Settings > Inertia to make the vehicle change direction more easily and feel more like an RC car. Overdoing it might cause instabilities and jitter.
  • For more advanced users adjusting the wheel friction curve of the friction presets can also help. However, in most cases adjusting slip coefficients will be adequate.

How to improve mobile performance?

VehicleController is quite well optimized but the settings by default are intended for desktop devices and visual quality.
Here are a few optimization tips:

  • Use Project Settings > Time > Fixed Delta Time of 0.02.
  • Use vehicles with low poly meshes.
  • Use mobile particle and skidmark shaders (included with Unity).
  • Reduce particle count and avoid using soft particles.
  • Reduce the quality of skidmarks under VehicleController > FX > Skidmark Manager.
  • Disable unneeded vehicle components under VehicleController > Settings > State Settings.
  • If there is stuttering on collision reduce the VehicleController > DamageHandler > Deformation Vertices Per Frame or use lower poly count mesh.

Why is physics update rate so important?

This is because the physics updates in discrete intervals (each X seconds, e.g. 0.02s by default) which means that the vehicle travels certain distance in between the frames, where there is no physics update. At 450 km/h, for example, that is 125 m/s or 2.5 meters traveled between the frames when using Time.fixedDeltaTime of 0.02 (50Hz physics update). In comparison, only a few cm of sideways travel on the tire can result in slip reaching the peak value and going over it, resulting in reduced friction due to the way tires work on hard surfaces in general. So, there are two ways to get around this:

  • Increase the update rate by decresing the Fixed Delta Time. This can be done through Project Settings > Time > Fixed Delta Time:
    • 0.03 (33Hz) - Lower end mobile devices. Low physics quality.
    • 0.02 (50Hz) - Default. Adequate for <100km/h.
    • 0.01667 (60Hz) - Suitable for most use cases. Average physics quality.
    • 0.01 (100Hz) - PC, high quality.
    • 0.005 (200Hz) - PC simulators.
  • Make the simulation a bit looser so that the tire can have a bit more play before resulting in loss of friction. This can be done by decreasing Wheel Controller > Stiffness to a value smaller than 1 (e.g. 0.6).
Previous Next

NWH Vehicle Physics 2 Documentation

Table of Contents

Table of Contents

  • FAQ
      • Vehicle physics is behaving weirdly (jitter, jumping, etc.).
      • Vehicle is not reacting to the input.
      • How to make the vehicle feel more arcade?
      • How to improve mobile performance?
      • Why is physics update rate so important?
  • About
  • Setup
  • Input
  • Vehicle Controller
  • Wheel Controller
  • NWH Common Scripts
  • Trailers
  • GUI
  • Multiplayer
  • Render Pipelines
  • Add-ons
  • FAQ
  • Troubleshooting
  • Demos
  • Changelog
  • Upgrade Notes
  • Support