Is there a function that allows you to target a mesh and automatically change the radius of the camera so that the target takes up the maximum space in the camera view ?
I made this drawing in order to try to make you understand better :
I’ve tried with your solution, wich was a good idea, but it was too complicate to setup with my needs. (i’ve tried something with this PG https://playground.babylonjs.com/#6FBD14#2385 without really success)
I finally found the function zoomOn() form Camera. But now i got 2 problems :
After using zoomOn() (press “Numpad1” or “3”) nothing is show anymore from a certain distance.
Hi,
Hope you are well. Took a quick at your PG and it looks like you have been messing things around a little with your KB Info for a start. Next thing is you cannot select a function as a camera setTarget. A mesh is expected. Finally, you have to use target to actually move your camera to a new target. setTarget only sets the target, it doesn’t define it has a NEW (Vector3) target.
Hope this new PG helps. Although, in this crude case scenario, one thing is yet undefined: That’s the direction from which the camera should look at the object and then the transition and eventually ease of the camera.
Edit: Sry, changed the key bindings. Now press H, I or Q to change target.
?? Do you mean the bug is still here today? There’s been some fixes done on zoomOn() lately.
To be honest, I’m not even sure to remember what the later issue was. Can we get a reminder? Thx,
I’ve put this link because I said that I was going to open a BUG and it was a way to tie the two together so that people who come in don’t have to search for the BUG in question. Sorry for the lack of explanation.
As the BUG discussion states: it wasn’t really a BUG, the framework works fine and I wanted to make it work in a different way, so I proposed a feature that remains to be developed.