PxVehicleGearboxUpdate

Defined in include/vehicle2/drivetrain/PxVehicleDrivetrainFunctions.h

void PxVehicleGearboxUpdate(const PxVehicleGearboxParams &gearboxParams, const PxF32 dt, PxVehicleGearboxState &gearboxState)

Update the current gear of the gearbox.

If a gear change is ongoing then complete the gear change if a threshold time has passed since the beginning of the gear change.

Note

A gear change is considered as ongoing for as long as PxVehicleGearboxState::currentGear is different from PxVehicleGearboxState::targetGear.

Parameters
  • gearboxParams[in] describes the time required to complete a gear change.

  • dt[in] is the time that has lapsed since the last call to PxVehicleGearboxUpdate.

  • gearboxState[out] is the gearbox state to be updated.