Added getters for camera properties
Added world translation for camera Renamed previous translation to local_translate
This commit is contained in:
parent
9a52587149
commit
9568b54b87
3 changed files with 34 additions and 8 deletions
|
@ -36,30 +36,30 @@ void manage_inputs()
|
|||
if (InputStatus::is_special_key_pressed(GLUT_KEY_RIGHT))
|
||||
{
|
||||
timer_ticks += 5;
|
||||
OGLE::camera.translate({0,0,0.1});
|
||||
OGLE::camera.local_translate({0, 0, 0.1});
|
||||
}
|
||||
if (InputStatus::is_special_key_pressed(GLUT_KEY_LEFT))
|
||||
{
|
||||
timer_ticks -= 5;
|
||||
OGLE::camera.translate({0,0,-0.1});
|
||||
OGLE::camera.local_translate({0, 0, -0.1});
|
||||
}
|
||||
if (InputStatus::is_key_pressed(' '))
|
||||
{
|
||||
OGLE::camera.translate({0,0.1,0});
|
||||
OGLE::camera.local_translate({0, 0.1, 0});
|
||||
}
|
||||
if (InputStatus::is_special_key_pressed(GLUT_KEY_PAGE_DOWN))
|
||||
{
|
||||
OGLE::camera.translate({0,-0.1,0});
|
||||
OGLE::camera.local_translate({0, -0.1, 0});
|
||||
}
|
||||
|
||||
if (InputStatus::is_special_key_pressed(GLUT_KEY_UP))
|
||||
{
|
||||
OGLE::camera.translate({0.1,0,0});
|
||||
OGLE::camera.local_translate({0.1, 0, 0});
|
||||
}
|
||||
|
||||
if (InputStatus::is_special_key_pressed(GLUT_KEY_DOWN))
|
||||
{
|
||||
OGLE::camera.translate({-0.1,0,0});
|
||||
OGLE::camera.local_translate({-0.1, 0, 0});
|
||||
}
|
||||
|
||||
// Get mouse delta since last frame
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue