wave-survival/modules/wave_survival/player_camera.h

25 lines
452 B
C++

#ifndef PLAYER_CAMERA_H
#define PLAYER_CAMERA_H
#include "scene/3d/camera_3d.h"
class PlayerCamera : public Camera3D {
GDCLASS(PlayerCamera, Camera3D);
static void _bind_methods();
void on_look_input(Vector2 input);
void update_fov();
protected:
void _notification(int what);
public:
void set_fov_factor(float value);
float get_fov_factor() const;
private:
float base_fov{ 60.f };
float fov_factor{ 1.0f };
};
#endif // !PLAYER_CAMERA_H