Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FallingCatch Mantle on low walls or objects #402

Open
bullet28 opened this issue Aug 7, 2022 · 2 comments
Open

FallingCatch Mantle on low walls or objects #402

bullet28 opened this issue Aug 7, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@bullet28
Copy link

bullet28 commented Aug 7, 2022

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

Screenshots and Videos
2
3
1

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

@bullet28 bullet28 added the bug Something isn't working label Aug 7, 2022
@SKD0007
Copy link

SKD0007 commented Aug 14, 2022

Bug & fix results: https://youtu.be/1wKzH5DO1J8

Thank you so much man. good stuff.

@EvoPulseGaming
Copy link

I just applied this fix, and it works. I also vote to get this merged!

Monichev added a commit to Monichev/ALS-Community that referenced this issue Sep 10, 2023
Monichev added a commit to Monichev/ALS-Community that referenced this issue Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants