Add "Q" / "E" as freelook keybindings

To move the view up and down.
This commit is contained in:
Jasper St. Pierre
2013-07-22 00:14:42 -04:00
parent 52482115e1
commit 3c7f223aa1
3 changed files with 9 additions and 3 deletions

View File

@ -619,10 +619,10 @@ void VertexShaderManager::SetMaterialColorChanged(int index)
nMaterialsChanged |= (1 << index);
}
void VertexShaderManager::TranslateView(float x, float y)
void VertexShaderManager::TranslateView(float x, float y, float z)
{
float result[3];
float vector[3] = { x,0,y };
float vector[3] = { x,z,y };
Matrix33::Multiply(s_viewInvRotationMatrix, vector, result);

View File

@ -32,7 +32,7 @@ public:
static void SetProjectionChanged();
static void SetMaterialColorChanged(int index);
static void TranslateView(float x, float y);
static void TranslateView(float x, float y, float z = 0.0f);
static void RotateView(float x, float y);
static void ResetView();
};