- Home /
Can the Camera be Positioned on the Game Screen through code?
Hello,
I have been looking around for a way to do this for quite some time now, but I just cannot seem to find anything.
I have two extra camera's in the game that I am making, one for the mini-map (i know there is a way around using a camera as a minimap, just in-case what I want to do isn't possible) and another camera to show my players face as a live avatar.
So this technically works fine, but it looks like total crap.
When I play the game full screen on my laptop, everything is positioned fine, however when I play it on my monitor or on my brother computer, the screens have different sizes and although my GUI stays in the same place, the camera view ports become bigger and don't fit the GUI's that I have created for them.
I would love to know how I can size the camera's view ports within my code, the same way I would my GUI.
Ex
GUI.DrawTexture (new Rect (Screen.width - 211, 0, 211, 171), MiniMapOverlay);
Is there a way to do this for the Camera Viewport?
Camera.position (Screen.width - 211, 0, 211, 171), miniMapCamera);
Thank you for any help! <3
Your answer
Follow this Question
Related Questions
Having Problems using the camera viewport. 1 Answer
Best way to keep your game in the correct camera? 1 Answer
Camera Viewport Shape 0 Answers
Minimap Camera Question 1 Answer
resetting the my default value for camera field of view 1 Answer