Compare commits

..

14 Commits

Author SHA1 Message Date
baz d96a5c837a Merge pull request 'Merge New Animations' (#2) from animations-mk2 into master
Reviewed-on: #2
2024-02-01 02:18:25 +01:00
baz deabd0b223 Play Throw AnimMontage when throwing 2024-02-01 01:00:47 +00:00
baz 957867ecd4 Play Dash AnimMontage when Dashing 2024-02-01 00:53:32 +00:00
baz 957da3946a Create GetCrouched method in PlayerCharacter 2024-02-01 00:53:01 +00:00
baz afc30330a7 Create Animation Monatages 2024-01-31 16:59:44 +00:00
baz c138e138ae anim stuff 2024-01-30 21:25:31 +00:00
baz 8cfdb34cde Add Dash Animation 2024-01-30 21:24:44 +00:00
baz cb5ecbd1e9 Add Throw Animation 2024-01-30 21:24:37 +00:00
baz 550e744e64 Fix Left Elbow Control 2024-01-30 20:31:58 +00:00
baz 83ebd0ff68 Add Animation map 2024-01-30 00:39:53 +00:00
baz c8c65bcd22 Add Mannequin Control Rig 2024-01-30 00:39:45 +00:00
baz 01699f4529 Add ADS animations 2024-01-25 00:01:29 +00:00
baz d3ba88cb3a Add sprinting animation 2024-01-24 17:20:26 +00:00
baz 4c4799b10a Add AnimStarterPack to Project 2024-01-24 17:03:26 +00:00
100 changed files with 341 additions and 8 deletions

BIN
Content/AnimStarterPack/ABP_Manequin.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Aim_Space_Hip.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Aim_Space_Ironsights.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/BS_Crouch_Walk.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/BS_Crouch_Walk_ADS.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/BS_Ironsights_Walk.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/BS_Walk.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Crouch_Idle_Rifle_Hip.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Crouch_Idle_Rifle_Ironsights.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Crouch_Walk_Bwd_Rifle_Hip.uasset (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
Content/AnimStarterPack/Crouch_Walk_Fwd_Rifle_Hip.uasset (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
Content/AnimStarterPack/Crouch_Walk_Lt_Rifle_Hip.uasset (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
Content/AnimStarterPack/Crouch_Walk_Rt_Rifle_Hip.uasset (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
Content/AnimStarterPack/Crouch_to_Stand_Rifle_Hip.uasset (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
Content/AnimStarterPack/Death_1.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Death_2.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Death_3.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Death_Ironsights_1.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Death_Ironsights_2.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Equip_Pistol_Standing.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Equip_Rifle_Standing.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Fire_Rifle_Hip.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Fire_Rifle_Ironsights.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Fire_Shotgun_Hip.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Fire_Shotgun_Ironsights.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Hit_React_1.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Hit_React_2.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Hit_React_3.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Hit_React_4.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Idle_Pistol.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Idle_Rifle_Hip.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Idle_Rifle_Hip_Break1.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Idle_Rifle_Hip_Break2.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Idle_Rifle_Ironsights.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Jog_Bwd_Rifle.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Jog_Fwd_Rifle.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Jog_Lt_Rifle.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Jog_Rt_Rifle.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Jump_From_Jog.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Jump_From_Stand.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Jump_From_Stand_Ironsights.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Prone_Death_1.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Prone_Death_2.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Prone_Fire_1.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Prone_Fire_2.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Prone_Idle.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Prone_Reload_Rifle.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Prone_Reload_Shotgun.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Prone_To_Stand.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Reload_Pistol.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Reload_Rifle_Hip.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Reload_Rifle_Ironsights.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Reload_Shotgun_Hip.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Reload_Shotgun_Ironsights.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Showcase.umap (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Sprint_Fwd_Rifle.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Stand_To_Prone.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Stand_to_Crouch_Rifle_Hip.uasset (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
Content/AnimStarterPack/Throw.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Throw_Montage.uasset (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Content/AnimStarterPack/Walk_Bwd_Rifle_Ironsights.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Walk_Fwd_Rifle_Ironsights.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Walk_Lt_Rifle_Ironsights.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/Walk_Rt_Rifle_Ironsights.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/dash.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/AnimStarterPack/dash_Montage.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Levels/Animation.umap (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Levels/TestLevel.umap (Stored with Git LFS)

Binary file not shown.

BIN
Content/Player/PlayerCharacter.uasset (Stored with Git LFS)

Binary file not shown.

View File

@ -385,6 +385,8 @@ void UNakatomiCMC::PerformDash()
FHitResult Hit; FHitResult Hit;
SafeMoveUpdatedComponent(FVector::ZeroVector, NewRotation, false, Hit); SafeMoveUpdatedComponent(FVector::ZeroVector, NewRotation, false, Hit);
NakatomiCharacterOwner->PlayAnimMontage(Dash_Montage);
SetMovementMode(MOVE_Falling); SetMovementMode(MOVE_Falling);
DashStartDelegate.Broadcast(); DashStartDelegate.Broadcast();

View File

@ -94,6 +94,9 @@ class NAKATOMI_API UNakatomiCMC : public UCharacterMovementComponent
UPROPERTY(EditDefaultsOnly) UPROPERTY(EditDefaultsOnly)
float Dash_CooldownDuration = 1.0f; float Dash_CooldownDuration = 1.0f;
UPROPERTY(EditDefaultsOnly)
UAnimMontage* Dash_Montage;
bool Safe_bWantsToSprint; bool Safe_bWantsToSprint;
bool Safe_bWantsToSlide; bool Safe_bWantsToSlide;
bool Safe_bWantsToAds; bool Safe_bWantsToAds;

View File

@ -139,7 +139,8 @@ void APlayerCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputCom
if (JumpAction) if (JumpAction)
{ {
Input->BindAction(JumpAction, ETriggerEvent::Triggered, this, &APlayerCharacter::JumpCallback); Input->BindAction(JumpAction, ETriggerEvent::Started, this, &APlayerCharacter::BeginJumpCallback);
Input->BindAction(JumpAction, ETriggerEvent::Completed, this, &APlayerCharacter::EndJumpCallback);
} }
if (FireAction) if (FireAction)
@ -231,9 +232,16 @@ void APlayerCharacter::LookCallback(const FInputActionInstance& Instance)
} }
} }
void APlayerCharacter::JumpCallback(const FInputActionInstance& Instance) void APlayerCharacter::BeginJumpCallback(const FInputActionInstance& Instance)
{ {
Jump(); Jump();
jumpPressed = true;
}
void APlayerCharacter::EndJumpCallback(const FInputActionInstance& Instance)
{
StopJumping();
jumpPressed = false;
} }
void APlayerCharacter::BeginFireCallback(const FInputActionInstance& Instance) void APlayerCharacter::BeginFireCallback(const FInputActionInstance& Instance)
@ -291,6 +299,8 @@ void APlayerCharacter::SetSprintingCallback(const FInputActionInstance& Instance
{ {
cmc->EnableSprint(); cmc->EnableSprint();
} }
IsSprinting = true;
} }
void APlayerCharacter::SetWalkingCallback(const FInputActionInstance& Instance) void APlayerCharacter::SetWalkingCallback(const FInputActionInstance& Instance)
@ -299,6 +309,8 @@ void APlayerCharacter::SetWalkingCallback(const FInputActionInstance& Instance)
{ {
cmc->DisableSprint(); cmc->DisableSprint();
} }
IsSprinting = false;
} }
void APlayerCharacter::CalculateHits(TArray<FHitResult>* hits) void APlayerCharacter::CalculateHits(TArray<FHitResult>* hits)
@ -691,6 +703,8 @@ void APlayerCharacter::ThrowWeaponCallback()
{ {
if (CurrentWeapon) if (CurrentWeapon)
{ {
PlayAnimMontage(ThrowAnimMontage);
FVector Location; FVector Location;
FVector BoxExtent; FVector BoxExtent;
GetActorBounds(true, Location, BoxExtent, false); GetActorBounds(true, Location, BoxExtent, false);
@ -714,6 +728,8 @@ void APlayerCharacter::ThrowExplosiveCallback()
{ {
if (ThrowableInventory.Num() > 0) if (ThrowableInventory.Num() > 0)
{ {
PlayAnimMontage(ThrowAnimMontage);
FVector Location; FVector Location;
FVector BoxExtent; FVector BoxExtent;
GetActorBounds(true, Location, BoxExtent, false); GetActorBounds(true, Location, BoxExtent, false);
@ -742,3 +758,18 @@ AThrowable* APlayerCharacter::ThrowThrowable()
return nullptr; return nullptr;
} }
bool APlayerCharacter::GetPressedJump()
{
return jumpPressed;
}
bool APlayerCharacter::GetCrouched()
{
if (UNakatomiCMC* cmc = GetCharacterMovementComponent())
{
return cmc->IsCrouching();
}
return false;
}

View File

@ -83,6 +83,9 @@ public:
FOnEnemyHitDelegate OnEnemyHit; FOnEnemyHitDelegate OnEnemyHit;
UPROPERTY(EditDefaultsOnly)
UAnimMontage* ThrowAnimMontage;
protected: protected:
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
float SprintSpeedMultiplier = 2.0f; float SprintSpeedMultiplier = 2.0f;
@ -121,8 +124,10 @@ private:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (AllowPrivateAccess = "true")) UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (AllowPrivateAccess = "true"))
UAIPerceptionStimuliSourceComponent* PerceptionSource; UAIPerceptionStimuliSourceComponent* PerceptionSource;
UPROPERTY(BlueprintReadOnly, Meta = (AllowPrivateAccess = "true"))
bool IsSprinting = false; bool IsSprinting = false;
UPROPERTY(BlueprintReadOnly, Meta = (AllowPrivateAccess = "true"))
bool IsADS = false; bool IsADS = false;
float AimSensitivity; float AimSensitivity;
@ -132,6 +137,8 @@ private:
UPROPERTY(EditDefaultsOnly) UPROPERTY(EditDefaultsOnly)
USoundBase* HitMarkerSound; USoundBase* HitMarkerSound;
bool jumpPressed = false;
public: public:
// Sets default values for this character's properties // Sets default values for this character's properties
APlayerCharacter(const FObjectInitializer& ObjectInitializer); APlayerCharacter(const FObjectInitializer& ObjectInitializer);
@ -153,7 +160,9 @@ public:
void LookCallback(const FInputActionInstance& Instance); void LookCallback(const FInputActionInstance& Instance);
void JumpCallback(const FInputActionInstance& Instance); void BeginJumpCallback(const FInputActionInstance& Instance);
void EndJumpCallback(const FInputActionInstance& Instance);
void BeginFireCallback(const FInputActionInstance& Instance); void BeginFireCallback(const FInputActionInstance& Instance);
@ -212,6 +221,12 @@ public:
AThrowable* ThrowThrowable(); AThrowable* ThrowThrowable();
UFUNCTION(BlueprintCallable)
bool GetPressedJump();
UFUNCTION(BlueprintCallable)
bool GetCrouched();
protected: protected:
virtual void CalculateHits(TArray<FHitResult>* hits) override; virtual void CalculateHits(TArray<FHitResult>* hits) override;