40
39

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Unityでメインカメラとサブカメラを同時に画面表示

Last updated at Posted at 2014-08-17

###概要
Unityでカメラを2つ用意して、それぞれのカメラに
写っているものを画面に表示するメモ

ゲームだとメイン画面とサブマップ画面みたいな使い方ができるかなと

###サンプル
やり方は簡単で
・CameraObjectを2つ用意
・CameraObjectの"ViewportRect"の値を調整
例)
MainCameraは X:0 Y:0 W:1 H:1
SubCameraは X:0.8 Y:0.8 W:0.2 H:0.2
とすると、MainCameraは全画面に、SubCameraは右上に表示される

SubCameraを上から俯瞰視点にすれば、ミニマップのような表示を
簡単にできるので、カメラ位置を調整すると色々できそう

MainCamera
MainCamera.png

SubCamera
SubCamera.png

###画面結果
Result.png

40
39
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
40
39

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?