Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Unity のドキュメントを含むあらゆる場所を見てきましたが、Unity の Vector2.Reflect() 関数の使用方法の良い例が見つからないようです。これを使用して、ボールが壁に当たったときに (2D ブレイクアウト ゲームで) ボールの方向を制御しようとしています。2 つの引数 (inDirection、inNormal) が必要ですが、これを使用する方法がわかりません。どんな助けでも大歓迎です。
Vector2 Reflect(Vector2 inDirection, Vector2 inNormal):
Vector2 Reflect(Vector2 inDirection, Vector2 inNormal)
inDirection: 黒矢印
inDirection
inNormal: 赤い矢印
inNormal
return output: 緑の矢印
return output