Skip to content

Commit

Permalink
Allow arrow keys to be used to move the camera.
Browse files Browse the repository at this point in the history
I keep attempting this when using ortho view.
  • Loading branch information
Robadob committed Mar 26, 2023
1 parent 02097b5 commit 4130904
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/flamegpu/visualiser/Visualiser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,16 +335,16 @@ void Visualiser::render() {
}
const float distance = speed * static_cast<float>(frameTime);
if (!modelConfig.isOrtho) {
if (state[SDL_SCANCODE_W]) {
if (state[SDL_SCANCODE_W] || state[SDL_SCANCODE_UP]) {
this->camera->move(distance);
}
if (state[SDL_SCANCODE_A]) {
if (state[SDL_SCANCODE_A] || state[SDL_SCANCODE_LEFT]) {
this->camera->strafe(-distance);
}
if (state[SDL_SCANCODE_S]) {
if (state[SDL_SCANCODE_S] || state[SDL_SCANCODE_DOWN]) {
this->camera->move(-distance);
}
if (state[SDL_SCANCODE_D]) {
if (state[SDL_SCANCODE_D] || state[SDL_SCANCODE_RIGHT]) {
this->camera->strafe(distance);
}
if (state[SDL_SCANCODE_Q]) {
Expand Down

0 comments on commit 4130904

Please sign in to comment.