Camera.orthographicSize 먼저 변경하고 thisCamera.projectionMatrix를 변경해야 한다.
Orthographic volume
Is there a way to set the "width and height" of the orthographic viewing volume? According to the documentation, orthographicSize is half the vertical size of the view volume and the width depends on the aspect ratio and the orthographicSize. I had thought that if I wanted a desired width I could do something like Camera.main.orthographicSize = DesiredWidth/Camera.main.aspect. This method gives me a view volume that is close to, but not quite, the actual size of a unit cube I scaled to my desired view volume size. The scene will have N cameras in a grid, each camera being a player. The camera view volumes need to be flush against each other in a grid. Now I could certainly just tweak the positioning so the offsets are hardcoded but I want to be able to dynamically zoom the cameras requiring me to mess with the orthoSize; |
I guess the easiest way is to setup your own projection matrix. Since orthographic projection is very simple, you just need setup a matrix that fits your needs and assign it to Camera.projectionMatrix. There are even some great examples on the doc-page. |
'게임 > Unity3D' 카테고리의 다른 글
[Unity3D] 투명, 색 지정 가능한 2 pass 관련 쉐이더 (0) | 2013.03.08 |
---|---|
[Unity3D] 유니티의 게임오브젝트 관리 (0) | 2013.02.14 |
[Unity3D] Animation 에 추가됬으면 하는 기능 (0) | 2013.02.13 |
[Unity3D] Editor 사용 시 (0) | 2013.02.12 |
[Unity3D] Active에 관해. (0) | 2013.02.06 |
[Unity3D] Inspector 에 구조체 내용 보이게 하기 (0) | 2013.01.07 |
[Unity3D][스크랩] 애니메이션 스크립팅(Animation Scripting) (0) | 2012.12.26 |
[Unity3D] Draw Call 과 Batching (0) | 2012.12.06 |
내가 생각하는 유니티 엔진 (0) | 2012.12.06 |
[Unity3D] 스펙 (0) | 2012.12.05 |