03-02-2021, 12:08 PM
(This post was last modified: 03-02-2021, 12:10 PM by Somanna.)
I have two buttons which I like to use for zooming functions. One for zooming in and the other for zooming out. So when I click on the Zoom-In button the viewport must Zoom-In and when I click on the Zoom-Out button the viewport must Zoom-Out. How do I do it? Are there any commands that can perform zooming functions or are there any methods for them?
This question is more for the Ab3d.PowerToys forum.
The Ab3d.DXEngine is rendering engine with some advanced controls to get lower level access to DirectX objects. The mouse and camera handling is usually handled by the objects from the Ab3d.PowerToys library.
When using cameras from Ab3d.PowerToys you can zoom in and out by changing the Distance property of the camera.
When using MouseCameraController, you can also call the ChangeCameraDistance method on the MouseCameraController.
I would advice you to check the samples that come with Ab3d.PowerToys library.