Merge pull request 'Merge New Animations' (#2) from animations-mk2 into master

Reviewed-on: #2
This commit is contained in:
baz 2024-02-01 02:18:25 +01:00
commit d96a5c837a
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

@ -384,6 +384,8 @@ void UNakatomiCMC::PerformDash()
FQuat NewRotation = FRotationMatrix::MakeFromXZ(DashDirection, FVector::UpVector).ToQuat(); FQuat NewRotation = FRotationMatrix::MakeFromXZ(DashDirection, FVector::UpVector).ToQuat();
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);

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);
@ -741,4 +757,19 @@ 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;
@ -131,6 +136,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
@ -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;