diff --git a/modules/viscosity/player_movement_action.cpp b/modules/viscosity/player_movement_action.cpp index 071cffd7..007048b6 100644 --- a/modules/viscosity/player_movement_action.cpp +++ b/modules/viscosity/player_movement_action.cpp @@ -5,10 +5,10 @@ void PlayerMovementAction::_bind_methods() { BIND_PROPERTY(Variant::FLOAT, target_speed); BIND_PROPERTY(Variant::FLOAT, acceleration); BIND_PROPERTY(Variant::FLOAT, deceleration); - ClassDB::bind_method(D_METHOD("process_movement"), &self_type::process_movement); + ClassDB::bind_method(D_METHOD("process_movement", "look_at_movement"), &self_type::process_movement); } -void PlayerMovementAction::process_movement() { +void PlayerMovementAction::process_movement(bool look_at_movement) { ERR_FAIL_COND_EDMSG(get_blackboard() == nullptr, "Parent behaviour tree of PlayerMovementAction is not a PlayerBehaviourTree"); double const delta{ get_process_delta_time() }; Vector3 target_velocity{ get_blackboard()->get_world_move_input().normalized() * this->target_speed }; diff --git a/modules/viscosity/player_movement_action.h b/modules/viscosity/player_movement_action.h index ac10da8c..5f3e1192 100644 --- a/modules/viscosity/player_movement_action.h +++ b/modules/viscosity/player_movement_action.h @@ -8,7 +8,7 @@ class PlayerMovementAction : public PlayerAction { static void _bind_methods(); public: - void process_movement(); + void process_movement(bool look_at_movement); private: float target_speed{ 5.f };