feat: lifted player input mouse look speed to variable

This commit is contained in:
Sara 2025-08-22 15:49:01 +02:00
parent 2a083b6430
commit 53a5118079
2 changed files with 2 additions and 1 deletions

View file

@ -66,7 +66,7 @@ void PlayerInput::unhandled_input(Ref<InputEvent> const &event) {
} }
Ref<InputEventMouseMotion> mouse_motion{ event }; Ref<InputEventMouseMotion> mouse_motion{ event };
if (mouse_motion.is_valid()) { if (mouse_motion.is_valid()) {
Vector2 state{ -mouse_motion->get_relative() * 0.0005f }; Vector2 state{ -mouse_motion->get_relative() * this->mouselook_speed };
emit_signal(sig_look_input, state); emit_signal(sig_look_input, state);
} }
if (event->is_action("primary_fire")) { if (event->is_action("primary_fire")) {

View file

@ -24,6 +24,7 @@ public:
private: private:
bool was_paused{ false }; bool was_paused{ false };
float mouselook_speed{ 0.0025f };
}; };
#endif // !PLAYER_INPUT_H #endif // !PLAYER_INPUT_H