My intention is to do a maze game with scroll and i have a doubt about how to implement a little square in my game showing an enemy moving around the maze.Can i place this square wherever i want in the screen?
Can i do it in the same layer, defining another camera following the enemy? can i place that camera, with small size, wherever i want in the screen showing me the enemy walking in the map?
Do i have to do it in another layer? that second layer has to be as small as the square where i want to show the enemy or has to be as big as the game view?
Cameras in layers are independent? camera 0 of layer 0 is different from camera 0 of layer 1?
Another questions…as i see in the examples in some games you have in the scene an object camera and in others you do not have any object camera in the scene…what is the difference between having an object camera as an object in the scene and not?
I was checking your example…so custom size is going to be the size of the “square” where i am going to see the enemy and viweport is where i am going to situate that “square” right? what happens if i place a viewport bigger or smallet than custom size defined?
In your example the enemy appears like zoomed…ho can i see him at the same size of the player?
To make you enemy non-zoomed… you will have to do some maths:
In my first example, the camera’s viewpoint = (0.8; 0) to (1; 0.2), the render zone = 0.2 x 0.2 at right-top of the window
So, this show 0.2 of the width, and 0.2 of the height:
8000.2 = 160
6000.2 = 120
The camera’s custom size needs to be 160 x 120 (if game’s window = 800x600), your camera shows everything that looks in the same size it looks ==> non-zoomed
If you set the camera’s viewpoint size = 0.2 x 0.5 the camera’s custom size should be 160 x 300.