Hi,
I’m still a newbie and so I might be missing something obvious here. Here’s my problem. When I add the orthographic camera to a basic mobile game template, the sprites visible before addition of the camera become invisible.
Any and all help is appreciated. Thanks.
Mobile game.zip (290.8 KB)
Did you change the render script to the one from the extension?
Do you mean in the Bootstrap option in the game.project? If then, yes, I did. In fact, it’s only after changing to orthographic.render that the game object ceases to be seen.
You have to add the Orthographic camera object like so:
1: Open your collection
2: Right-click it in the outline
[details=“3: Click “Add Game Object File””]
[/details]
[details=“4: Double-click “/orthographic/camera.go””]
[/details]
Now you can move and adjust the camera object to your liking
Sorry for the late reply.
Thank you so much because the game object is visible now.
But now I’ve run into another problem. GUI nodes resize properly when the size of the window is changed manually. But game objects remain the same size. So any idea as to what I’m doing wrong?
P.s - Should I make a new post about this problem or is this comment okay?
If the game objects remain the same size it is because you are using FIXED_ZOOM. If you want your game to maintain the same aspect ratio but zoom in/out to always show the same area regardless of window size then change to FIXED_AUTO.
Thank you so much. It works! Feel like an idiot for not figuring this out.
I’ve a question tho. Does changing setting to FIXED_AUTO affect the gui differently from the FIXED_ZOOM? I saw no difference which is a relief to me but am a little apprehensive that I might have missed something. My aim is to create a game with a GUI that works for all devices.
No it should be treated the same way.
Great. Thank you for putting my concern to rest.