[CLOSED] Need help with camera view

I have a scene of a game and I would like to make only visible an specific area. The red area.


I have tried to move the camera, to change the attributes of the camera in the editor, but the corners of the playing area are some times out of the camera view, and other times there is too little space on the left and right of the playing area.
Do you know any way to fix this?

Hi @Visama,

You can do this by changing the default way the camera is resized. Add a script to your active camera that sets the following property horizontalFov to true:

this.entity.camera.horizontalFov = true;

Now if you position your camera to view the complete playing area, the window width won’t affect your view from now and on.

I’m gonna try right away. Thanks

1 Like

I’m going to need more time than I thought to test this because It’s a colleague’s work and I don’t have much idea of how it works yet.
I’ll tell you as soon as I try it.

1 Like