Fixed michael animations

This commit is contained in:
2024-09-16 20:53:59 -07:00
parent 354813e6e0
commit dac4e26662
3 changed files with 75 additions and 49 deletions

View File

@@ -23,7 +23,9 @@ public partial class EnemyLogic
var velocity = (targetPosition - enemy.GlobalPosition).Normalized() * 1.0f;
enemy.Velocity = velocity;
var lookAtDir = enemy.GlobalTransform.Origin - enemy.Velocity;
enemy.LookAt(new Vector3(lookAtDir.X, enemy.GlobalPosition.Y, lookAtDir.Z));
if (enemy.Velocity != Vector3.Zero)
enemy.LookAt(new Vector3(lookAtDir.X, enemy.GlobalPosition.Y, lookAtDir.Z));
Output(new Output.MovementComputed());
return ToSelf();