feat: enemies now rotate with movement

This commit is contained in:
Sara 2025-07-20 21:46:18 +02:00
parent 526f756736
commit 1b0e4384b9

View file

@ -13,6 +13,9 @@ void EnemyBody::physics_process(double delta) {
GETSET(velocity, {
velocity = Vector3{ this->movement_direction.x, velocity.y, this->movement_direction.y };
});
if (!get_velocity().is_zero_approx()) {
look_at(get_global_position() + get_velocity());
}
move_and_slide();
}