feat: character actor now uses callable_mp for callables

This commit is contained in:
Sara 2024-04-11 23:03:32 +02:00
parent 58bf470a89
commit 1d440672f3

View file

@ -22,7 +22,7 @@ void CharacterActor::_bind_methods() {
void CharacterActor::_enter_tree() { GDGAMEONLY();
this->nav_agent = this->get_node<NavigationAgent3D>("NavigationAgent3D");
this->nav_agent->connect("velocity_computed", Callable(this, "set_velocity_target"));
this->nav_agent->connect("velocity_computed", callable_mp(this, &CharacterActor::set_velocity_target));
this->target_rotation = this->get_global_transform().get_basis().get_quaternion();
this->health = this->get_node<Health>("Health");
this->primary_weapon_pool = this->get_node<ProjectilePool>("ProjectilePool");