ConfigureVehicleSubsteps(float, int, int)
Configure vehicle sub-stepping parameters.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.VehiclesModule
public void ConfigureVehicleSubsteps(float speedThreshold, int stepsBelowThreshold, int stepsAboveThreshold)
Parameters
Remarks
Every time a fixed update happens, the vehicle simulation splits this fixed delta time into smaller sub-steps and calculates suspension and tire forces per each smaller delta. Then, it would sum up all resulting forces and torques, integrate them, and apply to the vehicle's body.
Using this function you can customize how many sub-steps will be performed by the simulation above and below the speed threshold.
It's enough to call this function only once per each vehicle, as it actually sets parameters to the vehicle but not to a wheel.