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

More than 1 year has passed since last update.

【Unity】Vector3は2Dゲーム作成時でも使用可能

Last updated at Posted at 2022-11-20

勝手な認識でVector3は3Dゲームの時、Vector2は2Dゲームを作る時って認識でいました。
違ったみたい。2Dゲーム作成時でもVector3を使うのね。

Vector2 = new Vector2(X, Y);

Vector3 = new Vector2(X, Y, Z);

Vector2はX(左右)Y(上下)に対して、Vector3はZ(手前奥)も指定
Zを指定することで立体感が出る為、3Dになるということ。
必ずしも、2Dゲーム作成の時はVector2というわけでは無い。

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