1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Cinemachine 3.1.5を使った2dアイソメトリック風ゲームでの追従カメラの設定方法

Posted at

Unity 3系でアイソメ風2Dゲームの追従カメラを作る手順(Cinemachine v3)

アイソメ風の2Dゲームで追従カメラを作りたかったのですが、調べると前バージョンの情報ばかりで、Cinemachine v3のやり方が見つからず困ったので、自分がやった方法を共有します。初心者なのでおかしな点があるかもしれません。

1. Cinemachine のインストール

これは以前と同じです。

Unity メニューの 「Window」→「Package Manager」 を開く

左上を 「Unity Registry」 に変更

「Cinemachine」 を検索してインストール

2. カメラの作成

ヒエラルキーで右クリック
→ 「Cinemachine」→「Targeted Cameras」→「Follow Camera」 を選んで作成します。
これはターゲットの追従に特化した仮想カメラらしいです。

3. 追従対象の設定

作成したカメラを選択すると 「Cinemachine Camera」 コンポーネントがあります。
その中の 「Tracking Target」 に、プレイヤーなど追従させたいオブジェクトをドラッグ&ドロップします。

4. Main Camera の確認

最後に、Main Camera に以下がついているか確認します。

Cinemachine Brain コンポーネント

Live Camera に先ほど作った Follow Camera が設定されていること

基本的に自動で設定されますが、ついていなければ手動で追加してください。

これで追従カメラが動作するようになります。

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?