Slightly modify enemy LoS stuff
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user