SP and TP cameras

This commit is contained in:
A-lex-Ra
2023-12-11 22:22:52 +06:00
parent 3ae3001227
commit 20caa4b980
9 changed files with 123 additions and 7 deletions
+3
View File
@@ -20,6 +20,9 @@ Player::Player(glm::vec3 position, float speed) :
speed(speed),
choosenBlock(1) {
camera = new Camera(position, glm::radians(90.0f));
currentViewCamera = camera;
SPCamera = new Camera(position, glm::radians(90.0f));
TPCamera = new Camera(position, glm::radians(90.0f));
hitbox = new Hitbox(position, vec3(0.3f,0.9f,0.3f));
}
+2 -1
View File
@@ -14,6 +14,7 @@ class Level;
struct PlayerInput {
bool zoom;
bool cameraMode;
bool moveForward;
bool moveBack;
bool moveRight;
@@ -29,7 +30,7 @@ struct PlayerInput {
class Player {
float speed;
public:
Camera* camera;
Camera* camera, *SPCamera, *TPCamera, *currentViewCamera;
Hitbox* hitbox;
bool flight = false;
bool noclip = false;