LoginSignup
2
2

More than 5 years have passed since last update.

UnityのPhysics2D.BoxCastについて

Posted at

矩形を移動させてその経路上で衝突したコライダを返す。
移動開始時点に接触しているコライダは返さないので注意。
角度は移動方向には影響しない。

必須パラメータ
Vector2 origin 座標
Vector2 size サイズ
float angle 回転角(Degree)
Vector2 direction 移動方向

任意パラメータ
float distance 移動距離
int layerMask チェックするレイヤー
float minDepth z座標上の最小衝突範囲
float maxDepth z座標上の最大衝突範囲(この2つはまだ使った事ない)

2
2
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
2
2