24 lines
624 B
C++
24 lines
624 B
C++
#ifndef CAMERA_EFFECTS_HPP
|
|
#define CAMERA_EFFECTS_HPP
|
|
|
|
#include <godot_cpp/classes/camera3d.hpp>
|
|
#include <godot_cpp/templates/vector.hpp>
|
|
namespace gd = godot;
|
|
|
|
class CameraEffects : public gd::Camera3D {
|
|
GDCLASS(CameraEffects, gd::Camera3D);
|
|
static void _bind_methods();
|
|
public:
|
|
virtual void _ready() override;
|
|
virtual void _process(double delta) override;
|
|
void push_effect(float time, float intensity);
|
|
void select_target();
|
|
private:
|
|
double end_time{0.5f};
|
|
float intensity{1.f};
|
|
gd::Vector3 target{0.f, 0.f, 0.f};
|
|
gd::Vector3 home{0.f, 0.f, 0.f};
|
|
};
|
|
|
|
#endif // !CAMERA_EFFECTS_HPP
|