public void MouseMove(GLUserInput glUserInput, Point mousePoint) { //Cursor.Hide(); mouseNewLocation.X = mousePoint.X; mouseNewLocation.Y = mousePoint.Y; double deltaX = (mouseNewLocation.X - mouseStartingLocation.X) * 1 / mouseSensitivity; double deltaY = (mouseNewLocation.Y - mouseStartingLocation.Y) * 1 / mouseSensitivity; mouseStartingLocation.X = mouseNewLocation.X; mouseStartingLocation.Y = mouseNewLocation.Y; if (mouseRightButton) { } else { glUserInput.LookAround(deltaX, deltaY); } }
public static void KeyDown(GLUserInput glUserInput, Keys key) { if (key == Keys.A) { glUserInput.TurnLeft(); } if (key == Keys.D) { glUserInput.TurnRight(); } if (key == Keys.W) { glUserInput.MoveForward(); } if (key == Keys.S) { glUserInput.MoveBackward(); } if (key == Keys.E) { glUserInput.MoveUp(); } if (key == Keys.C) { glUserInput.MoveDown(); } if (key == Keys.Q) { glUserInput.LookUp(); } if (key == Keys.Z) { glUserInput.LookDown(); } glUserInput.UpdateLookAt(); }