Skip to content
This repository has been archived by the owner on Dec 3, 2020. It is now read-only.

Commit

Permalink
WASD camera rotate
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubenwardy committed May 6, 2013
1 parent 1f9366e commit 2129088
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cEditor.cpp
Expand Up @@ -281,13 +281,13 @@ bool cEditor::OnEvent(const SEvent& event)
mouse_position.X=event.MouseInput.X;
mouse_position.Y=event.MouseInput.Y;
}else if (event.EventType == EET_KEY_INPUT_EVENT){
if (event.KeyInput.Key== KEY_DOWN){
if (event.KeyInput.Key== KEY_DOWN || event.KeyInput.Key== KEY_KEY_S){
pivot->setRotation(vector3df(pivot->getRotation().X-1,pivot->getRotation().Y,pivot->getRotation().Z));
}else if (event.KeyInput.Key== KEY_UP){
}else if (event.KeyInput.Key== KEY_UP || event.KeyInput.Key== KEY_KEY_W){
pivot->setRotation(vector3df(pivot->getRotation().X+1,pivot->getRotation().Y,pivot->getRotation().Z));
}else if (event.KeyInput.Key== KEY_LEFT){
}else if (event.KeyInput.Key== KEY_LEFT || event.KeyInput.Key== KEY_KEY_A){
pivot->setRotation(vector3df(pivot->getRotation().X,pivot->getRotation().Y+1,pivot->getRotation().Z));
}else if (event.KeyInput.Key== KEY_RIGHT){
}else if (event.KeyInput.Key== KEY_RIGHT || event.KeyInput.Key== KEY_KEY_D){
pivot->setRotation(vector3df(pivot->getRotation().X,pivot->getRotation().Y-1,pivot->getRotation().Z));
}
}else if (event.EventType == EET_GUI_EVENT){
Expand Down

0 comments on commit 2129088

Please sign in to comment.