mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-05 19:31:04 +00:00
Basic camera control API (#15796)
This commit is contained in:
parent
50819ace8f
commit
ba62808fe8
18 changed files with 162 additions and 42 deletions
|
@ -57,8 +57,6 @@ struct Nametag
|
|||
}
|
||||
};
|
||||
|
||||
enum CameraMode {CAMERA_MODE_FIRST, CAMERA_MODE_THIRD, CAMERA_MODE_THIRD_FRONT};
|
||||
|
||||
/*
|
||||
Client camera class, manages the player and camera scene nodes, the viewing distance
|
||||
and performs view bobbing etc. It also displays the wielded tool in front of the
|
||||
|
@ -169,7 +167,8 @@ public:
|
|||
void drawWieldedTool(irr::core::matrix4* translation=NULL);
|
||||
|
||||
// Toggle the current camera mode
|
||||
void toggleCameraMode() {
|
||||
void toggleCameraMode()
|
||||
{
|
||||
if (m_camera_mode == CAMERA_MODE_FIRST)
|
||||
m_camera_mode = CAMERA_MODE_THIRD;
|
||||
else if (m_camera_mode == CAMERA_MODE_THIRD)
|
||||
|
@ -185,7 +184,7 @@ public:
|
|||
}
|
||||
|
||||
//read the current camera mode
|
||||
inline CameraMode getCameraMode()
|
||||
inline CameraMode getCameraMode() const
|
||||
{
|
||||
return m_camera_mode;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue