- Home /
Copy the persp/ortho switch in the editor view?
Hi, I have a question that (I hope) should have a straightforward answer:
In the Editor view window, there's a button to switch the viewpoint used in that window from Perspective view to Orthographic view. This creates a very smooth transition between the two views.
I'd like to have an effect like that in my game. I've done perspective-to-ortho switches before, but they don't come out as clean-looking as that effect in the editor. Is it possible to find the code which controls this button in the editor window? Is there something obvious I can do to replicate this effect?
Thank you!
Answer by Cherno · Aug 16, 2017 at 07:28 PM
I remember having seen a custom script for this a few years ago. It transitioned from orthographic to perspective smoothly by chaning the ortho size and/or fov over time. Do some searching, I'm sure you'll be able to find it. It was either here on UA or on the user wiki.
Edit: turns out I even bookmarked it because it seemed useful back then even though I never used it.
Smooth transition between perspective and orthographic modes
I've actually tried this, and I didn't think it was very smooth, to be honest. I think it's a little different from the way it's done in the editor.
This is my current implementation, but I'm curious if anyone knows how it's done in the editor.
Thanks, though!
Your answer
Follow this Question
Related Questions
Change Editor Camera Orthographic Size 2 Answers
How do I: Fake a 360 spin with an Orthographic Camera? 0 Answers
Editor - Sprites disappearing - Batching 0 Answers
Orthographic objects follow in perspective 2 Answers
Drawing Handles 1 Answer