Add new Sprint enemy movement speed

This commit is contained in:
baz 2024-02-19 21:53:19 +00:00
parent a1832e352e
commit 78d363bc09
2 changed files with 5 additions and 0 deletions

View File

@ -21,6 +21,9 @@ EBTNodeResult::Type UBTTSetMovementSpeed::ExecuteTask(UBehaviorTreeComponent& ow
case EPatrolMovementEnum::WALK:
enemyPawn->GetCharacterMovementComponent()->SetMaxWalkSpeed(walkSpeed);
break;
case EPatrolMovementEnum::SPRINT:
enemyPawn->GetCharacterMovementComponent()->SetMaxWalkSpeed(sprintSpeed);
break;
default:
enemyPawn->GetCharacterMovementComponent()->SetMaxWalkSpeedToDefault();
break;

View File

@ -25,6 +25,8 @@ private:
float slowWalkSpeed = 250.0f;
float walkSpeed = 500.0f;
float sprintSpeed = 750.0f;
public:
virtual EBTNodeResult::Type ExecuteTask(UBehaviorTreeComponent& owner, uint8* memory) override;