SetCameraTarget on vector, does not zoom?

So basically i want to set the target to the center of the object. So i get the length in all directions and safe the half of them in a vector. Then i want to set the target of the camera to that point/vector.
That does work so far, but the camera does not zoom an, as it does with targeting a mesh.
I set the Framingbehavior to true and tried ZoomOn but that doesn’t really works either.

I rebuild an easy example scene in this playground : Babylon.js Playground

My best solution rn is, to make a box or some other mesh by MeshBuilder, set the position to my desired position and then set the camera target to that box

Indeed, the framing behavior won’t work in this case, as it relies on onMeshTargetChangedObservable which takes a mesh as parameter. So, when the target is a Vector3, null is passed to the observers of this observable.

1 Like