I want to develop a functionality where a user will be able to press a button that move the focus of the camera to a selected object and reposition the camera (with a fixed FoV) to frame the object correctly.
In face, I want to reproduce the behavior of the F shortcut in the editor:
In the editor, you can select an object
You can press F key
The camera move put the select object in the center of the view and adjusts the distance (arms length) to make the whole object visible.
Is there an easy way to reproduce that in blueprint? I’m actually doing trigonometry stuff and using bounding box size but I’m pretty sure there is a better way. I don’t want to recreate a feature that may be already accessible (and already developed in the quickpayportal editor).