i guess it's working
All checks were successful
Linux arm64 / Build (pull_request) Successful in 1m21s

This commit is contained in:
2024-08-17 17:18:13 +02:00
parent d261672f51
commit 65808e9dee
20 changed files with 338 additions and 68 deletions

View File

@@ -1,5 +1,6 @@
#include "FirstPersonPlayer.h"
#include <godot_cpp/classes/camera3d.hpp>
#include <godot_cpp/classes/engine.hpp>
#include <godot_cpp/classes/input.hpp>
#include <godot_cpp/classes/input_event_mouse_motion.hpp>
@@ -104,7 +105,7 @@ void FirstPersonPlayer::UpdateBobbing(float a_Delta) {
void FirstPersonPlayer::UpdateCamera(const InputEventMouseMotion& a_Event) {
m_Head->rotate_y(-a_Event.get_relative().x * SENSITIVITY);
m_Mesh->rotate_y(-a_Event.get_relative().x * 0.005);
m_Mesh->rotate_y(-a_Event.get_relative().x * SENSITIVITY);
m_Camera->rotate_x(-a_Event.get_relative().y * SENSITIVITY);
float rotationX = m_Camera->get_rotation().x;