Camera zoom to object bounds at runtime

Hello everyone,

I am trying to archive an effect at runtime that is already existing in the editor.
When you select an object in the viewport of the editor and press “F” the camera translates to that object and zooms out just as much as is needed to have the whole model inside the viewport without anything getting cut off outside the viewport.
As far as I know this is based on the object’s bounds.

What I would need is the same functionality but this time at runtime (i.e. playing the game). I would prefer doing this with blueprints, but am openminded to code hints too.

It would be really helpful to me if someone can point me in the right direction. Maybe I’ve just missed a camera function somewhere but I feel stuck at the moment.

Thanks in advance

Hi did u got a solution for that ??