Missed mob rotation
This commit is contained in:
@@ -655,6 +655,9 @@ public static class MobAI
|
||||
|
||||
if (dist < 1f) return;
|
||||
|
||||
// Update rotation to face movement direction
|
||||
mob.Rotation = MathF.Atan2(dy, dx);
|
||||
|
||||
float moveX = (dx / dist) * speed;
|
||||
float moveY = (dy / dist) * speed;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user