playcanvas / editor

Issue tracker for the PlayCanvas Editor
https://playcanvas.com/
154 stars 28 forks source link

Viewport zoom issue #1110

Open LeXXik opened 6 months ago

LeXXik commented 6 months ago

The current viewport zoom sensitivity depends on the AABB size of whatever is under the cursor. It works fine when the overall size of the root is small, but if there are some pieces away from the origin, stretching root AABB, the zoom becomes jarring, when nothing is under the cursor (using root AABB). The result is that it is easy to lose the focal point on whatever you are currently working on and have to reset the view. This happens too often to become a bother.

Repro: https://playcanvas.com/editor/scene/1960132

https://github.com/playcanvas/editor/assets/5677782/13ed7fd8-7384-40d5-8015-c460717acb26

Maksims commented 6 months ago

Probably the best here would be to ensure that if mouse hover is not picking anything, then the default speed that is calculated based on AABB size should be maxed at a reasonable speed.

LeXXik commented 6 months ago

Another option is to keep the current functionality, but allow only enabled entities to contribute to the root AABB size. Then we could have at least some control over zooming speed.