x


Editor Camera Orthograpric Control

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.

more ▼

asked May 05 '11 at 08:21 PM

MiguelDeLaCruz gravatar image

MiguelDeLaCruz
52 9 9 16

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

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".

more ▼

answered May 06 '11 at 08:07 PM

Bart 2 gravatar image

Bart 2
18 1 1 4

(comments are locked)
10|3000 characters needed characters left
more ▼

answered May 05 '11 at 08:29 PM

Henrique Vilela gravatar image

Henrique Vilela
318 11 14 19

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)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2983
x1663
x715
x151
x1

asked: May 05 '11 at 08:21 PM

Seen: 2852 times

Last Updated: May 06 '11 at 07:02 PM