反射する弾やレーザーを作る時、反射の計算が凄くややこしいのですがUnityにはVector2.Reflect(3Dの場合はVector3.Reflect)という反射ベクトルを簡単に取得出来る命令があります。 Vector2.Reflectのリファレンスと見てみると Vector2 Reflect (Vector2 inDirection, Vector2 inNormal ...
Rayを飛ばす時にRay2D ray = new Ray2D(transform.position, transform.up);のように書くと transform.upの方向にRayを飛ばしてくれるのですが、このtransform.upはtransform.upとtransform.rightしかないんですよね。 (下なら-transform.up左なら-transform.rightと書く) ...
現在アクセス不可の可能性がある結果が表示されています。
アクセス不可の結果を非表示にする