Adjust collision penetration, but only along a given axis?

Just as an afterthought, I can do this, but it doesn’t necessarily mean I won’t still be overlapping some objects… hmm.



                    // We can only adjusted collision BACK along the aim axis, unfortunately, this makes this an iterative approach :/
                    //ProposedAdjustment += MTDResult.Direction * MTDResult.Distance;
                    const float PenetrationDot = FVector::DotProduct(AdjustAxis, MTDResult.Direction);
                    if (PenetrationDot > 0.f)
                    {
                        ProposedAdjustment += -AdjustAxis * (MTDResult.Distance * PenetrationDot);
                    }