Camera rotation issue

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.

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);

It seems that input_->GetMouseMove() returns incorrect value after window’s minimizing.

May be someone already had this problem ? How can fix it ? Thanks.

I’m not sure but everything seems to be working on my end without any mouse or editor issues. Any console errors? You should post your specs and probably submit an issue @ github.

I have checked Urho3D samples. The same problem was occurred.


Errors did not appear in console output.

Great but then again, posting your specs would be better so others can replicate or might have some ideas with this problem. If you’re just new to Urho3D, I suggest downloading the latest (v1.5) “release” sources for issues like this one:

I compile urho3d projects under Win7 64bit and Visual Studio 2013. I will try the latest version.

Just post an issue here:

if you think you found a problem with the latest build. I still suggest trying out the 1.5 release version or with other versions of VS. I’m only using VS2k8 express and MinGW and it works great.

I have compiled Urho3D 1.5 release version under Visual Studio 2013 and get the same problem. I am going to write issue.

This was an SDL bug related to non-Aero mode. Should be fixed now.