Camera Goes To Wrong Position When Going Full Screen

I have been working on a game where I need 2d functionality for some levels and 3d for others (I am very excited to show you all the finished game once I have it done).

To do this, I have been trying to combine elements from: Dragosha’s lights and shadows project:
Releases · Dragosha/defold-light-and-shadows · GitHub

With the simple 2d lighting from Britzl.
Simple 2D Lighting - Questions - Defold game engine forum

This worked fine for a while, but I took a month break from the project. When I came back, the full screen functionality had issues.
On the 2d stage, it zoomed into the corner (it looks like it’s just focusing on point 0,0,0).
On the 3d stage, the camera looks in a slightly different direction (up and to the right).

Game running at normal size:

Game running at full screen:

I don’t see anything in the release notes that would have changed anything.

Render scripts are mostly beyond my level, so I have a hard time trying to trouble shoot or locate issues.

Any ideas for what might be causing this?

I can share a copy of what I have so far if needed.

I may go back to a previous version of the engine which was working for me for the time being.

1 Like

I think this is caused by the camera’s position , I see that it stuck and does not follow the player , check the game-object’s position

Maybe there is a way to make the camera automatically pick the center of the world

what is clear is the the world got bigger but the camera’s position is still the same , interesting .

I’ll wait just next to you until someone can help

What if you make the camera follow an invisible game-object that is always in the center of the level ? this way it will always centered because you centered the game-object , is it possible ?

I’m assuming that you do not want the camera to follow the player .

Thanks for the idea! The camera is following the player when it goes to full screen, it seems as if there is some sort of offset occurring.

Here is a video that helps show what I am dealing with: