blob: a9ba03183d220a25a5c6a7469f8db8e006b877fc (
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
|
#pragma once
#include "xe_game_object.hpp"
#include "xe_input.hpp"
#include <glm/common.hpp>
#include <glm/fwd.hpp>
#include <glm/geometric.hpp>
#include <limits>
namespace app {
class KeyboardMovementController {
public:
struct KeyMappings {
int moveLeft = KEY_A;
int moveRight = KEY_D;
int moveForward = KEY_W;
int moveBackward = KEY_S;
int moveUp = KEY_E;
int moveDown = KEY_Q;
int lookLeft = KEY_LEFT;
int lookRight = KEY_RIGHT;
int lookUp = KEY_UP;
int lookDown = KEY_DOWN;
};
void update(xe::XeInput &input, xe::XeGameObject& gameObject, float dt);
KeyMappings keys{};
float moveSpeed{3.f};
float lookSpeed{1.5f};
};
}
|