Fixed slide not sliding in some ramps
Signed-off-by: TjgL <lithmoneo@gmail.com>
This commit is contained in:
parent
8de8366328
commit
024a814424
BIN
Content/Legumix/Player/BP_Play.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Player/BP_Play.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/ABP_Arms.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/ABP_Arms.uasset
(Stored with Git LFS)
Binary file not shown.
@ -245,7 +245,7 @@ void ULMMovementComponent::PhysSlide(float DeltaTime, int32 Iterations)
|
|||||||
bool ULMMovementComponent::GetSlideSurface(FHitResult& Hit) const
|
bool ULMMovementComponent::GetSlideSurface(FHitResult& Hit) const
|
||||||
{
|
{
|
||||||
FVector Start = UpdatedComponent->GetComponentLocation();
|
FVector Start = UpdatedComponent->GetComponentLocation();
|
||||||
FVector End = Start + CharacterOwner->GetCapsuleComponent()->GetScaledCapsuleHalfHeight() * 2.f * FVector::DownVector;
|
FVector End = Start + CharacterOwner->GetCapsuleComponent()->GetScaledCapsuleHalfHeight() * 2.f * FVector::DownVector + FVector(0, 0, SlideSurfaceCheckOffset);
|
||||||
FName ProfileName = TEXT("BlockAll");
|
FName ProfileName = TEXT("BlockAll");
|
||||||
return GetWorld()->LineTraceSingleByProfile(Hit, Start, End, ProfileName , PlayerCharacterOwner->GetIgnoreCharacterParams());
|
return GetWorld()->LineTraceSingleByProfile(Hit, Start, End, ProfileName , PlayerCharacterOwner->GetIgnoreCharacterParams());
|
||||||
}
|
}
|
||||||
|
@ -88,6 +88,9 @@ public:
|
|||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category="Legumix|Slide")
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category="Legumix|Slide")
|
||||||
float SlideFriction = 1.3f;
|
float SlideFriction = 1.3f;
|
||||||
|
|
||||||
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category="Legumix|Slide", meta=(UIMax=0))
|
||||||
|
float SlideSurfaceCheckOffset = -75.f;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void EnterSlide();
|
void EnterSlide();
|
||||||
void ExitSlide();
|
void ExitSlide();
|
||||||
|
Reference in New Issue
Block a user