[Interest] Centering camera on bounding volume change in Qt3D

Mike Krus mike.krus at kdab.com
Sat Mar 25 07:16:37 CET 2023


Have you tried to call QCamera::viewAll() ?


> On 24 Mar 2023, at 21:38, Maxime Roussin-Bélanger <maxime.roussinbelanger at gmail.com> wrote:
> Hi there,
> Despite searching through the documentation, I couldn't find a solution to my problem. I have a 3D scene, and I am trying to center the camera when the bounding volume of the scene changes. Essentially, if an entity's width/height/depth changes and/or when I add a new entity, I would like the camera to remain pointed at the center of the bounding sphere. Do you have any suggestions or resources that may help achieve this? I need some sort of signal I guess?
> If something in the Private API can be helpful, I might bind on this, but I would rather not.
> Thanks,
> Max
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest

Mike Krus | mike.krus at kdab.com | Senior Software Engineer & Teamlead
KDAB (UK) Ltd., a KDAB Group company
Tel: UK Office +44 1625 809908   Mobile +44 7833 491941
KDAB - The Qt Experts, C++, OpenGL Experts

More information about the Interest mailing list