Update Control Rig to Use Inverse Kinematics

This commit is contained in:
Philip W 2023-10-16 14:34:48 +01:00
parent d932cd7e70
commit 975818c157
5 changed files with 15 additions and 6 deletions

Binary file not shown.

View File

@ -59,10 +59,15 @@ void AEnemyCharacter::SetLocalAlertLevel(int NewAlertLevel) const
DelegatedControlHub->SetAlertLevel(NewAlertLevel);
}
void AEnemyCharacter::EquipWeapon_Implementation()
{
}
void AEnemyCharacter::HuntPlayer(FVector PlayerLastKnownLocation)
{
if (!IsValid(this)) return;
if (!IsValid(GetController())) return;
SetAlertLevel(2);
EquipWeapon();
Cast<AAIController>(GetController())->GetBlackboardComponent()->SetValueAsVector("LastKnownLocation", PlayerLastKnownLocation);
}

View File

@ -28,6 +28,10 @@ public:
virtual void Tick(float DeltaTime) override;
void SubscribeToGroupAIEvents(class AAIControlHub* ControlHub);
void SetLocalAlertLevel(int NewAlertLevel) const;
UFUNCTION(BlueprintNativeEvent)
void EquipWeapon();
virtual void EquipWeapon_Implementation();
private:
FDelegateHandle AlertLevelDelegateHandle;