Slightly modify enemy LoS stuff

This commit is contained in:
2024-09-16 00:02:38 -07:00
parent 8143da44db
commit 660a5f5553
4 changed files with 6 additions and 6 deletions

View File

@@ -20,7 +20,7 @@ public partial class EnemyLogic
var delta = input.Delta;
var enemy = Get<IEnemy>();
var targetPosition = enemy.NavAgent.GetNextPathPosition();
var velocity = (targetPosition - enemy.GlobalPosition).Normalized() * 3.0f;
var velocity = (targetPosition - enemy.GlobalPosition).Normalized() * 1.0f;
enemy.Velocity = velocity;
enemy.Rotation = new Vector3(0, (float)Mathf.LerpAngle(enemy.Rotation.Y, Mathf.Atan2(enemy.Velocity.X, enemy.Velocity.Z), delta * 10.0), 0);