Open
Description
Describe the bug
If you collide with an object or wall in flight, then a mantle is applied, but if this wall or object is too low, then when the animation is played, the character's legs fall through the floor. Also Mantle in this situation is rather doubtful from a gameplay point of view.
To Reproduce
Jump and hold W while flying towards wall
Additional context
I decided to disable mantle for such situations in my project by putting this code between "Step 4" and "Step 5" of the UALSMantleComponent::MantleCheck function
if (MantleType == EALSMantleType::FallingCatch)
{
FVector GroundTraceStart = CapsuleBaseLocation;
GroundTraceStart.Z = DownTraceLocation.Z;
FVector GroundTraceEnd = GroundTraceStart;
GroundTraceEnd.Z -= 70.0f;
const float CapsuleRadius = OwnerCharacter->GetCapsuleComponent()->GetScaledCapsuleRadius();
const FCollisionShape CapsuleCollisionShape = FCollisionShape::MakeCapsule(CapsuleRadius, CapsuleRadius);
const bool bHitGround = World->SweepSingleByProfile(HitResult, GroundTraceStart, GroundTraceEnd, FQuat::Identity, MantleObjectDetectionProfile, CapsuleCollisionShape, Params);
if (bHitGround)
{
return false;
}
}
Bug & fix results: https://youtu.be/1wKzH5DO1J8