I’ve been playing around for a few days with babylonJS (and cannonjs) and I must say I enjoy both the engine the community that goes with it !
I found here most of my issues but here is a problem I can’t figure out :
I need to frame my viewport to a wall so that we can only see the wall (and the whole width of the wall). I could do this manually but as we are on a responsive webpage I need to adapt my camera so it will always cover the whole wall.
What I was thinking a bout is to adapt the camera FOV to the width of the wall but I can’t find the formula to start from a width and a camera position to end up with the right FOV. Any idea on this ?
I’m not sure if my question is clear but I hope I can find some help !