diff --git a/Source/Nakatomi/NakatomiCharacter.cpp b/Source/Nakatomi/NakatomiCharacter.cpp index c60e675..4f1e224 100644 --- a/Source/Nakatomi/NakatomiCharacter.cpp +++ b/Source/Nakatomi/NakatomiCharacter.cpp @@ -25,6 +25,8 @@ void ANakatomiCharacter::BeginPlay() Super::BeginPlay(); SetInventoryToDefault(); + + NakatomiCMC = Cast(GetCharacterMovement()); } // Called every frame @@ -237,6 +239,11 @@ void ANakatomiCharacter::PushThrowableToInventory(TSubclassOf Throwa } } +UNakatomiCMC* ANakatomiCharacter::GetCharacterMovementComponent() +{ + return NakatomiCMC; +} + void ANakatomiCharacter::CalculateHits(TArray* hits) { } diff --git a/Source/Nakatomi/NakatomiCharacter.h b/Source/Nakatomi/NakatomiCharacter.h index 3aa1a0d..1951dc3 100644 --- a/Source/Nakatomi/NakatomiCharacter.h +++ b/Source/Nakatomi/NakatomiCharacter.h @@ -104,6 +104,8 @@ public: void PushThrowableToInventory(TSubclassOf Throwable); + UNakatomiCMC* GetCharacterMovementComponent(); + protected: virtual void CalculateHits(TArray* hits);