blob: ec3063e20009420de4207ae50b30159c0c9ebefc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#ifndef PLAYERCAMGDS_H
#define PLAYERCAMGDS_H
#include <Godot.hpp>
#include <ClippedCamera.hpp>
#include <RigidBody.hpp>
#include <SpringArm.hpp>
#include <Input.hpp>
namespace godot {
class PlayerCam : public ClippedCamera {
GODOT_CLASS(PlayerCam, ClippedCamera)
private:
String mode;
Spatial* head;
Spatial* neck;
RigidBody* player;
SpringArm* arm;
Vector2 mouse_axis;
float mouse_sensitivity;
public:
static void _register_methods();
PlayerCam();
~PlayerCam();
void _init();
void _ready();
void _input(const Ref<InputEvent> event);
void attach(Node* new_parent, String c_mode, String extra_path = ".");
void mouse_firstperson();
void mouse_thirdperson();
void mouse_arm();
void mouse_freecam();
};
}
#endif
|