Main camera defaults to minimap camera when game running

Another issue I stumbled into. When I look at the Game view in the Scene Map 01 things look like they should.

However once I run the game things don’t.

My cube is a 1x1 cube but the camera is on top of it and turns it into a top down view. I went through the lecture a few times and even a couple before to compare camera settings in both the main camera and minimap and from what I can tell I am matching perfectly. I tried moving the camera further up and back…doesn’t matter. I had the entire floor in vie in the Game scene but it looks like the second picture above as soon as I run the game.

I copied the script from the git repository and no luck. I moved ahead a lecture to see if anything popped up but nothing there either. I did add the terrain in from the subsequent lecture but the plane is 100x100 so I changed the map scale to 50 and camera size to 50 and still no luck. Same result as above.

Hi there,
This looks like you are getting the feed from the minimap camera instead of the main camera. You can try adjusting the priority on the cameras to fix this.

I think there is also a trick in Unity where it prioritizes cameras based on the order you add them. So try removing the main camera and then re-adding it. Let me know if this helps!

You’re like superman on these forums! Thanks for being patient and helpful with those of us with questions. I found the issue after a while. I tried your trick but to no avail unfortunately. I needed a couple days off and when I came back with new eyes I found it was a typo in the rotation angle of the camera that is attached to the Player prefab. I guess I used the numpad and typed in 75 instead of 45. I increased the height as well as the map is bigger now and it seems to work. Needs some fine tuning still but it the camera is no longer right on top of the map.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms