Fennec
June 28, 2023, 6:48pm
2
You have a 3D camera, you need to position and scale your model relative to the camera viewport, or make the camera viewport fit the model, check the thread bellow:
Hi guys!
Thanks so much for the replies!!!
Let’s see if with your code I can get to the desired result.
I would like to remove the restriction of having the camera in front of the object.
These are my changes. Not tested since I am on a really old laptop right now, but in theory should work. Now we should be able to put the camera on ANY position and still make zoom work:
const fitCameraToObject = function ( camera, object, offset, controls ) {
offset = offset || 1.25;
const boundingBox…