Fix fake error and also looking during attacks
This commit is contained in:
@@ -90,7 +90,7 @@ public partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLogic>
|
||||
return;
|
||||
|
||||
var lookDir = GlobalPosition + Velocity;
|
||||
if (_enemyLogic.Value is not EnemyLogic.State.Attacking && (!lookDir.IsEqualApprox(GlobalPosition) || !Velocity.IsZeroApprox()))
|
||||
if (!lookDir.IsEqualApprox(GlobalPosition) || !Velocity.IsZeroApprox())
|
||||
LookAt(lookDir, Vector3.Up, true);
|
||||
|
||||
var isWalking = _enemyLogic.Value is EnemyLogic.State.Patrolling or EnemyLogic.State.FollowPlayer;
|
||||
|
||||
Reference in New Issue
Block a user