@lazybitgames In FgearWheel, about ABS, this line:
mABSActive &= FMath::Abs(deltaV * mVehicle->getABS()) > optimalSlip;
Not should be just “=” without “&” ?
mABSActive = FMath::Abs(deltaV * mVehicle->getABS()) > optimalSlip;
And why the “bool activate = mABSActive;” ¿?
Why not just:
mABSActive = FMath::Abs(deltaV * mVehicle->getABS()) > optimalSlip;
if (mABSActive)
{
float scaler = 1.0f - mVehicle->getABS();
deltaV *= FMath::Max(scaler, 0.001f);
}
else if (mHandbrakeActive)
{
deltaV *= mVehicle->getHandbrakePower();
}