feat: replaced running animation with procedural motion

This commit is contained in:
Sara 2025-08-29 18:13:50 +02:00
parent c2bdcc2c07
commit b08b390c6e
2 changed files with 26 additions and 1 deletions

View file

@ -2,12 +2,14 @@
#define PLAYER_CAMERA_H
#include "scene/3d/camera_3d.h"
class PlayerBody;
class PlayerCamera : public Camera3D {
GDCLASS(PlayerCamera, Camera3D);
static void _bind_methods();
void on_look_input(Vector2 input);
void update_fov();
void update_offset();
void ready();
void process(double delta);
@ -23,6 +25,9 @@ public:
private:
float base_fov{ 60.f };
float fov_factor{ 1.0f };
Vector3 home{ 0, 0, 0 };
double time{ 0.0 };
PlayerBody *body{ nullptr };
};
#endif // !PLAYER_CAMERA_H