mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 12:31:51 +00:00
SP and TP cameras
This commit is contained in:
parent
3ae3001227
commit
20caa4b980
9 changed files with 123 additions and 7 deletions
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue