|
The camera component has a boolean called orthographic. It is used to either have the camera be in perspective or orthographic mode. I'm attempting to change this bool during editor mode, not during runtime. And we know that we can somewhat access the editor's scene view camera via Camera.current or SceneView.lastActiveSceneView. So far we can access and set, the camera's rotation like this: SceneView.lastActiveSceneView.rotation = Quaternion(...), and the position like this: SceneView.lastActiveSceneView.pivot = Vector3(...). However, I don't know how to access the orthographic bool for the life of me. When I access the camera, it is read-only, so current.camera and SceneView.lastActiveSceneView.camera is fail. Does anyone have any insight on this? Thanks ahead of time.
(comments are locked)
|
|
In the top right corner of the scene view there is a gizmo that shows the three axes of dimensional space. Under it you currently see "Persp", which means your scene view camera is in perspective. If you click on any of the cones in the gizmo, the camera will switch rotate to look from that direction and it will switch from "Persp" to "Iso", short for "Isometric" which is an orthographic projection. You can hold and drag the right mouse button to change the orthographic view's direction, and you can click on the cube at the center of the gizmo to return to "Persp".
(comments are locked)
|
Source: http://unity3d.com/support/documentation/ScriptReference/Camera-orthographic.html Dang, I should have been more descriptive, I meant the editor scene camera, let me edit my question (hits forehead)
May 05 '11 at 08:33 PM
MiguelDeLaCruz
(comments are locked)
|
