unity : 景色感? camera projection

http://docs.unity3d.com/Documentation/Components/class-Camera.html

Projection 景色をシミュレートするカメラの機能を切り替えます。
Perspective カメラがそのままの景色でオブジェクトをレンダリングします。
Orthographic カメラが景色感なしで、オブジェクトを均一にレンダリングします。

日本語難しいですね、けしきかん、けいしょくかん?なに?と
実際動かすとわかりますが
Perspective 遠近法みたいな
Orthographic 正投影みたいな
でしょうか?意味的にはそう言う感じだと思います。

設定したサイズの縦横比率もよくわかりません。
と思ったら w h があれでしたね、画面サイズの逆比率をいれたら正方形になる感じで

上手く横幅を併せる方法がわからなかったのですが
size を height/2 にして、各オブジェクトを*sizeに拡大してあげたら上手く出来ました。

http://forum.unity3d.com/threads/113641-Orthographic-screen-size

/2がポイントのようです。

Camera.main.orthographicSize = Screen.height/2;
testGameObjct.localScale = new Vector3( 0.5f*w, 0.5f*w, 0.5f*w );

This entry was posted on 月曜日, 5月 5th, 2014 at 7:57 PM and is filed under unity. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Unityによるゲームを公開しております iOS/Android
https://itunes.apple.com/jp/app/lost-knight-3d-action/id900917032
https://play.google.com/store/apps/details?id=com.groundroad.runknight

各種開発支援・機能開発等小さいお仕事などもお請けしております。
unity開発支援, PHPシステム開発, javascript/html5 フロント開発, titanium mobileアプリ開発
お気軽にお問い合わせください
大崎・五反田近郊での対面でのお打ち合わせはいつでも可能です。