Patch - Adds camera input handling - V14.5.32
Adds a system for managing camera input using a dedicated CameraInput struct and updates the camera class to process these inputs. This allows for more flexible and controlled camera movement.
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
// INCLUDES //
|
||||
//////////////
|
||||
#include <directxmath.h>
|
||||
|
||||
#include "input_class.h"
|
||||
#include "macro.h"
|
||||
using namespace DirectX;
|
||||
|
||||
@@ -121,7 +123,15 @@ public:
|
||||
return upF;
|
||||
}
|
||||
|
||||
/**
|
||||
* Move the camera
|
||||
* @param std::vector<bool> inputs : forward, backward, left, right, up, down, scrollUp, scrollDown, rightClick
|
||||
* @param float deltaTime : time since last frame
|
||||
* @return void
|
||||
*/
|
||||
void move(float deltatime);
|
||||
|
||||
void update_camera_inputs_states(input_class* imputs);
|
||||
|
||||
private:
|
||||
float position_x_, position_y_, position_z_;
|
||||
@@ -129,6 +139,8 @@ private:
|
||||
XMMATRIX view_matrix_;
|
||||
XMMATRIX reflection_view_matrix_;
|
||||
|
||||
float camera_speed_;
|
||||
std::shared_ptr<CameraInput> inputs_;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user