From 957867ecd40cacd5942e20cbfc7272d5da606440 Mon Sep 17 00:00:00 2001 From: baz Date: Thu, 1 Feb 2024 00:53:32 +0000 Subject: [PATCH] Play Dash AnimMontage when Dashing --- Content/AnimStarterPack/ABP_Manequin.uasset | 4 ++-- Content/AnimStarterPack/dash_Montage.uasset | 4 ++-- Content/Player/PlayerCharacter.uasset | 4 ++-- Source/Nakatomi/NakatomiCMC.cpp | 2 ++ Source/Nakatomi/NakatomiCMC.h | 3 +++ 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Content/AnimStarterPack/ABP_Manequin.uasset b/Content/AnimStarterPack/ABP_Manequin.uasset index 223cb57..48438f0 100644 --- a/Content/AnimStarterPack/ABP_Manequin.uasset +++ b/Content/AnimStarterPack/ABP_Manequin.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:574e34bd473706eda614b78b2226789779eae549662975606c8cc76ae570cb1e -size 656154 +oid sha256:6bdfca536e23f7278b022f305b187963de274bab4fdcf3d32ecea0bd85993cbb +size 691403 diff --git a/Content/AnimStarterPack/dash_Montage.uasset b/Content/AnimStarterPack/dash_Montage.uasset index ea501b7..729f7a8 100644 --- a/Content/AnimStarterPack/dash_Montage.uasset +++ b/Content/AnimStarterPack/dash_Montage.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e1b0319960f45c71d38311a8358b19ceff88d0e2f7c728afb97b9d8d7d8cae47 -size 9371 +oid sha256:44f6c5426edaba0cd8219c8550cf064f0d7910f7f87cc13234f9cfe5fc180159 +size 9410 diff --git a/Content/Player/PlayerCharacter.uasset b/Content/Player/PlayerCharacter.uasset index 8ca38e8..b363e27 100644 --- a/Content/Player/PlayerCharacter.uasset +++ b/Content/Player/PlayerCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:abd7a9ed2b153399fde13f6b213201a7747cb30b45717a95777e8e9f3f1c6143 -size 42665 +oid sha256:bbdd91730bd2d0f28990730f9e4a7f51af431c637221f9a4162184ba8320f394 +size 42184 diff --git a/Source/Nakatomi/NakatomiCMC.cpp b/Source/Nakatomi/NakatomiCMC.cpp index 01bfb5e..1e45ce7 100644 --- a/Source/Nakatomi/NakatomiCMC.cpp +++ b/Source/Nakatomi/NakatomiCMC.cpp @@ -384,6 +384,8 @@ void UNakatomiCMC::PerformDash() FQuat NewRotation = FRotationMatrix::MakeFromXZ(DashDirection, FVector::UpVector).ToQuat(); FHitResult Hit; SafeMoveUpdatedComponent(FVector::ZeroVector, NewRotation, false, Hit); + + NakatomiCharacterOwner->PlayAnimMontage(Dash_Montage); SetMovementMode(MOVE_Falling); diff --git a/Source/Nakatomi/NakatomiCMC.h b/Source/Nakatomi/NakatomiCMC.h index e66d391..5ef4b35 100644 --- a/Source/Nakatomi/NakatomiCMC.h +++ b/Source/Nakatomi/NakatomiCMC.h @@ -94,6 +94,9 @@ class NAKATOMI_API UNakatomiCMC : public UCharacterMovementComponent UPROPERTY(EditDefaultsOnly) float Dash_CooldownDuration = 1.0f; + UPROPERTY(EditDefaultsOnly) + UAnimMontage* Dash_Montage; + bool Safe_bWantsToSprint; bool Safe_bWantsToSlide; bool Safe_bWantsToAds;