AB4D Forum

Full Version: zoom and rotate don't work after upgrade
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

After upgrading AB3D PowerToys, zoom and rotate don't work anymore, unless the mouse hovers over an object.

What could be the source of this problem?

Thanks,
Radu Iordanescu
If you check the "MouseCameraController / Main properties" sample in the Ab3d.PowerToys samples project, you will see that you can rotate and zoom when mouse is not over the 3D model. 

To do that, you need to set the MouseCameraController.EventsSourceElement to a parent control that has Background brush set - for example Border with Transparent Background. 

If MouseCameraController.EventsSourceElement is not set, or if the control has null as BackgroundBrush (Border does not have Background property set), or EventsSourceElement is set to Viewport3D, then rotation and zoom (and also all other mouse event based actions) will only work when the mouse is over the 3D object. This is also described in the info tooltip that can be seen when mouse is over the (?) icon.

This behavior is there since the first version of Ab3d.PowerToys.


So could you please check what are the differences in your code and in the "MouseCameraController / Main properties" sample and try to find some other hint of why this may not work.
Thanks Andrej,

Changing the Camera EventsSourceElement from MainViewport to ViewportBorder solved the problem.