Multiple reverse gears

Is it possible to have multiple different reverse gears with a Vehicle? When switching gears, the vechicle will always automatically pass through the Neutral gear (index 1) for mSwitchTime seconds?

Is it possible to have multiple different reverse gears with a Vehicle?

As the code stands right now, we don’t support that. I think it would be fairly easy for you to make the changes to support this. It’s not immediately clear how the autobox would work with multiple reverse gears so I’d start by disabling the autobox and handling that yourself before calling PxVehicleUpdates. The next task would be to remove eREVERSE so that the enum can be extended to include eREVERSE1, eREVERSE2, eREVERSE3 etc. Initial values then need to be set for all new gears in the constructor for PxVehicleGearsData. Then you need to update the function processGears in PxVehicleUpdate.cpp to allow a gear down from eREVERSE1 to eREVERSE2.

When switching gears, the vechicle will always automatically pass through the Neutral gear (index 1) for mSwitchTime seconds?

There are many ways to change gear with physx vehicles. The first way is by calling setGearUp/setGearDown. This works through the gears one at a time and goes through neutral for mSwitchTime. The second way is to call setTargetGear. This jumps to any desired gear but also goes through neutral for mSwitchTime. The last method is to call forceGearChange. This instantly puts the car in the desired gear.

Cheers,

Gordon