diff --git a/src/player.cpp b/src/player.cpp index 4ccaf26..d702088 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -33,7 +33,7 @@ void Player::_process(double delta) { // process rotations this->process_rotate(delta); // global character rotation this->process_transform_camera(delta); // camera input rotation - // set the global motion based on model-space motion vector + // convert model-space motion vector to global space gd::Basis const &model_basis{this->model_node->get_global_basis()}; this->anim_tree->set_walk_speed(gd::Math::max(0.f, model_basis.get_column(2).dot(this->camera_parent->get_basis().get_column(2)))); gd::Vector3 const local_motion{this->anim_tree->get_root_motion_position()};