I found one problem when window is minimized and then restored. So after window’s minimizing camera start wrong behave. (Very fast rotate)
I have captured this moment.
https://www.youtube.com/watch?v=ZAqciLK8XVU&feature=youtu.be
Code that is responsible for camera rotation is following -
if (input_->GetMouseButtonDown(MOUSEB_RIGHT) || input_->GetMouseButtonDown(MOUSEB_MIDDLE))
{
IntVector2 mouseMove = input_->GetMouseMove();
if (mouseMove.x_ != 0 || mouseMove.y_ != 0)
{
activeView->cameraYaw_ += mouseMove.x_ * cameraBaseRotationSpeed;
activeView->cameraPitch_ += mouseMove.y_ * cameraBaseRotationSpeed;
if (limitRotation)
activeView->cameraPitch_ = Clamp(activeView->cameraPitch_, -90.0, 90.0);
Quaternion q = Quaternion(activeView->cameraPitch_, activeView->cameraYaw_, 0);
cameraNode_->SetRotation(q);
}
}
It seems that input_->GetMouseMove() returns incorrect value after window’s minimizing.
May be someone already had this problem ? How can fix it ? Thanks.