Hello!
Today I updated the CGE and faced with the problem: in the TCastleWalkNavigation with mdRotate mode and MouseLook is disabled, the camera does not rotate when I holding the mouse button.
I already see it has been definitely caused by new CASTLE_COLLECT_MOTION mechanism, (commehts here). This indeed changes the processing of motion – although I don’t understand yet how it breaks mdRotate (it seems the relevant code always gets “almost zero” motion delta, but instead it should accumulate and be a big delta).
Anyhow, it’s definitely a regression and I’ll try to fix it ASAP today Thanks for reporting!
Short version: The fix is pushed to the branch mouse-position-fixes and now waits for automatic tests to pass. Once this is done, I’ll merge it to master branch and let here know.
More details:
Fixing this was more fun than anticipated The fix necessitated a code cleanup that spanned a number of files related to mouse events communication between lower-level code (sometimes system/compiler specific) and CGE.
Done & tested manually everything now (FPC/Delphi, Windows/Linux/Android/macOS, castle-model-viewer/model_3d_viewer/tests/few examples). Of course I also tested it fixes your testcase, mdRotate works again as it should.
I want now to want for our automatic checks (GitHub Actions) to confirm it’s good everywhere. It should happen this Sunday.
Would this affect my middle mouse button mouselook issue when the mouse goes over another window that also handles middle button events? I still need to make a test case for you. I could probably fix it in my code by keeping track of the ‘active’ mouselook control, but if it is a bug you want to fix then that wouldn’t be helpful. Busy on outside fronts as winter looms at 2560m ASL.
No, I’m afraid I doubt these two issues (this thread, and thread Mouselook and my tool windows ) are related. In the latter case, it seems MousePosition is OK, but the “release” event is not reported where it should. This is something else than the error in this thread, when MousePosition was sometimes wrong (causing mdRotate to not work).