Some camera modes requires user inputs (free and orbital camera modes at the moment). If using one of them they should be notified of user inputs.

In the processUnbufferedMouseInput method or similar:

if(mCameraCS->getCameraModeName(mCameraCS->getCurrentCameraMode()) == "Free")
{
  CCS::FreeCameraMode* freeCameraMode = (CCS::FreeCameraMode*)mCameraCS->getCameraMode("Free");

  freeCameraMode->yaw(ms.X.rel);
  freeCameraMode->pitch(ms.Y.rel);
}

In the processUnbufferedKeyInput method or similar:

...
if(mCameraCS->getCameraModeName(mCameraCS->getCurrentCameraMode()) == "Free")
{
  CCS::FreeCameraMode* freeCameraMode = (CCS::FreeCameraMode*)mCameraCS->getCameraMode("Free");

  if(mKeyboard->isKeyDown(OIS::KC_A))
    freeCameraMode->goLeft();

  if(mKeyboard->isKeyDown(OIS::KC_D))
    freeCameraMode->goRight();
  ...
}
else if(mCameraCS->getCameraModeName(mCameraCS->getCurrentCameraMode()) == "Orbital")
{
  CCS::OrbitalCameraMode* orbitalCameraMode = (CCS::OrbitalCameraMode*)mCameraCS->getCameraMode("Orbital");

  if(mKeyboard->isKeyDown(OIS::KC_A))
    orbitalCameraMode->yaw(1);

  if(mKeyboard->isKeyDown(OIS::KC_D))
    orbitalCameraMode->yaw(-1);
  ...
}

PostHeaderIcon Comments


Please feel free to add comments, suggestions or alert me about errors you found on this page. You can also use the Ogre forums.

User login