static void GetVehicleAutoBoxSetup(const FVehicleAutoBoxData& Setup, PxVehicleAutoBoxData& PxSetup) { for (uint32 i = PxVehicleGearsData::eFIRST; i < PxVehicleGearsData::eGEARSRATIO_COUNT; i++) { const FGearUpDownRatio& RatioData = Setup.ForwardGearAutoBox[i - PxVehicleGearsData::eFIRST]; PxSetup.mUpRatios[i] = RatioData.UpRatio; PxSetup.mDownRatios[i] = RatioData.DownRatio; } PxSetup.mUpRatios[PxVehicleGearsData::eNEUTRAL] = Setup.NeutralGearUpRatio; PxSetup.setLatency(Setup.GearAutoBoxLatency); }
static void GetVehicleAutoBoxSetup(const FVehicleTransmissionData& Setup, PxVehicleAutoBoxData& PxSetup) { for (int32 i = 0; i < Setup.ForwardGears.Num(); i++) { const FVehicleGearData& GearData = Setup.ForwardGears[i]; PxSetup.mUpRatios[i] = GearData.UpRatio; PxSetup.mDownRatios[i] = GearData.DownRatio; } PxSetup.mUpRatios[PxVehicleGearsData::eNEUTRAL] = Setup.NeutralGearUpRatio; PxSetup.setLatency(Setup.GearAutoBoxLatency); }