feat: no longer checking for proximity in CharacterActor::move_to
This commit is contained in:
parent
56f0e3bc87
commit
317b7f877a
|
@ -65,9 +65,7 @@ void CharacterActor::aim_direction(Vector3 direction) {
|
|||
|
||||
void CharacterActor::move_to(Vector3 to, float target_distance) {
|
||||
this->nav_agent->set_target_desired_distance(target_distance);
|
||||
this->nav_agent->set_target_position(this->get_global_position().distance_squared_to(to) < target_distance * target_distance
|
||||
? this->get_global_position()
|
||||
: to);
|
||||
this->nav_agent->set_target_position(to);
|
||||
}
|
||||
|
||||
void CharacterActor::shoot_at(Vector3 at) {
|
||||
|
|
Loading…
Reference in a new issue