Camera Orthographic to Perspective with rotation
hello I was wondering if anyone knows a code for making a Camera Orthographic view to smoothly rotate to the Perspective view. I was also wanting to trigger this event from pressing the 1 key to be perspective and the 2 key to go back to Orthographic in the form of rotation. I have no idea how i can make this code possible.can anyone help out ? Thanks
Orthographic view is like looking at the Scene from very far away, with a very narrow camera (try it -- pull a camera back and narrow the camera angle (size) -- the scene will look less perspective-y and more orthograph-y.)
So you could have the perspective camera zoom in from very far, using trig to adjust the Size to keep the same borders. But I think that would make people dizzy.
I think just snapping the views is the best thing.
yea thanks, I'm currently making a game in which a 2D camera will rotate to a 3D camera so that you can play the game in both 2D and 3D. I was also thinking of the possibility of having 2 separate camera one thats Orthographic and one in perspective and just see if i can code the swiching of the camera's with the 1 & 2 key but yea i'm just experimenting.
I found this code at the forums and it works: http://forum.unity3d.com/threads/32765-Smooth-transition-between-perspective-and-orthographic-modes
yes I seen this before but it wasn't exactly what i was looking for.
for ex.
your playing $$anonymous$$ario and obviously the camera is in Orthographic view right? well as you play a 2D platform and press whatever button the orthographic camera then rotates to the point of view of $$anonymous$$ario. you are now seeing the world in perspective in his eyes.
I was doing some experiments and thought i could probably just create an animation for the camera so that when i press the button then the game will trigger the animation. The code they have in that link dose help a lot since i would need to control the zoom in functions for the perspective and orthographic. but Thank you the code dose help
Cameras from and almost-from the player are called "first-person" and "third-person" cameras. You might be able to find more, Searching using those terms.
An overhead camera doesn't even have to be orthographic. Usually a narrow perspective camera shows everything just fine, with a pretty slight 3D look.
Your answer
Follow this Question
Related Questions
Preventing world interactions when using an UI element with an Orthographic 3D camera 0 Answers
Orthographic camera size not changing 0 Answers
Cursor not staying centered to gameobject 0 Answers
Orthographic camera realtime shadows problem 1 Answer
Orthographic Camera Appears to be Only Rendering Top Half of the Screen? 0 Answers