fix: character_actor now updates rotation when AI-controlled

This commit is contained in:
Sara 2024-04-11 23:03:59 +02:00
parent 1d440672f3
commit 83e0b16133

View file

@ -32,14 +32,16 @@ void CharacterActor::_enter_tree() { GDGAMEONLY();
}
void CharacterActor::_process(double delta_time) { GDGAMEONLY();
this->process_rotation(delta_time);
if(!this->mode_manual) {
this->process_behaviour(delta_time);
this->process_navigation(delta_time);
if(!this->velocity_target.is_zero_approx())
this->aim_direction(this->velocity_target.normalized());
}
if(this->firing) {
this->try_fire_weapon();
}
this->process_rotation(delta_time);
}
void CharacterActor::_physics_process(double delta_time) { GDGAMEONLY();