![]() |
|
CameraQuickZoomStarted & CameraQuickZoomEnded not fired - Printable Version +- AB4D Forum (https://forum.ab4d.com) +-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4) +--- Forum: Ab4d.SharpEngine (https://forum.ab4d.com/forumdisplay.php?fid=12) +--- Thread: CameraQuickZoomStarted & CameraQuickZoomEnded not fired (/showthread.php?tid=4502) |
CameraQuickZoomStarted & CameraQuickZoomEnded not fired - BiMMate - 10-31-2025 I think CameraQuickZoomStarted & CameraQuickZoomEnded events are not fired for MouseCameraController I know I can subscribe to MouseCameraController.Camera.PropertyChanged, but there I can't know when zoom is done RE: CameraQuickZoomStarted & CameraQuickZoomEnded not fired - BiMMate - 10-31-2025 Update: I had a mistake in my initialization of the mouse camera controller Now those events are fired properly, but when using mouse wheel, zooming seems to go other route Is there a way I can handle when mouse wheel zoom start and end other than Avalonia/Wpf mouse events? RE: CameraQuickZoomStarted & CameraQuickZoomEnded not fired - abenedik - 10-31-2025 Mouse rotation, moving and quick zoom events are all started when a specific user action is performed and then until this action is ended, the camera is rotated, moved or zoomed by using quick zoom. However, when you rotate the mouse wheel, this is a one-time event - there is no start and end to the mouse wheeling. From our private conversations, I know that you want to disable some rendering and update tasks to make camera rotation and movement faster - when the rotation or movement is finished, then you enable the normal rendering again. If you want to do a similar thing with the mouse wheel, you would need to add a timer or something that would start after the first mouse wheel event - so some time after the zooming ends, you would enable normal rendering. To do this, you will need to subscribe to Avalonia, WPF (or other UI) mouse wheel event. For example, for Avalonia, you can use: Code: MainSceneView.PointerWheelChanged += (sender, args) =>RE: CameraQuickZoomStarted & CameraQuickZoomEnded not fired - BiMMate - 10-31-2025 I got it working However, I don't see much difference in performance as I do with other natively supported SharpEngine events Anyway I can say that, thanks to your help, I've greatly improved the performance of camera operations in very large models Thanks, Andrej |