2D ジョイントは、3D ジョイント物理コンポーネントの 2D 版で、2D ゲームオブジェクトでのみ動作するように作られています。このジョイントは、Rigidbody 2D コンポーネントがアタッチされているゲームオブジェクトか、ワールド空間の固定位置にしかアタッチできません。2D ジョイントは Rigidbody 2D ゲームオブジェクトと別の Rigidbody 2D ゲームオブジェクトを接続します。このジョイントは Rigidbody ゲームオブジェクトを動かす力を加えることができ、ジョイントの制限は、その動きを制限することができます。
Component ブラウザー で、2D ジョイントと 3D ジョイントを見分けることができます。2D ジョイントの名前は “2D” で終わっています。
様々なタイプの 2D ジョイントが使用可能です。各タイプのジョイントのリファレンスページで、プロパティと使用に関する詳細情報が参照できます。
トピック | 説明 |
---|---|
2D ジョイントの制約 | 2D ジョイントの使用に際しての制約を説明しています。 |
Distance Joint 2D | Rigidbody (リジッドボディ) 物理演算で制御される 2 つのゲームオブジェクトを、一定の距離を保って接続します。 |
Fixed Joint 2D | 2 つのオブジェクトを互いに対して一定の位置に保つことで、それらが常に一定の位置と角度でオフセットされるようにします。これは、あたかも固く接続されているかのように反応する必要があるオブジェクトに役立ちます。また、このジョイントを使用して、ある程度の柔軟性を持った、あまり固く固定されていない接続を作成することもできます。 |
Friction Joint 2D | Rigidbody (リジッドボディ) 物理演算で制御される 2 つのゲームオブジェクト間の線速度と角速度の両方をゼロにします (つまり、それらのゲームオブジェクトを減速させ停止させます)。 例えば、このジョイントを使って、回転しながらも回転に抵抗するプラットフォームを作成できます。 |
Hinge Joint 2D | Rigidbosy (リジッドボディ) 物理演算で制御されるゲームオブジェクトを、空間内の (それを中心に回転が可能な) 1 点にアタッチします。例えば、ピボットや、はさみの支点などに使用可能です。 |
Relative Joint 2D | Rigidbody (リジッドボディ) 物理演算で制御される 2 つのゲームオブジェクトの位置を、互いの位置に基づいて維持できるようにします。このジョイントは、2 つのオブジェクトを互いから一定のオフセットに保つために使用します。例えば、このジョイントを使用して、スペースシップの位置に追従する 2 つの追加的な銃を取り付けたりできます。 |
Slider Joint 2D | Rigidbody (リジッドボディ) 物理演算で制御されるゲームオブジェクトを、空間内の特定の線に沿ってスライドできるようにします。例えば、このジョイントを使用して、引き戸オブジェクトを作成できます。 |
Spring Joint 2D | Rigidbody (リジッドボディ) 物理演算で制御される 2 つのゲームオブジェクトを、あたかもバネで接続されているように反応させることができます。 |
Target Joint 2D | 他のジョイントのように Rigidbody (リジッドボディ) オブジェクトに接続するのではなく、指定のターゲットに接続します。これは、例えば重力の影響下で動作するオブジェクトを拾ったり動かしたりするために使用できる、バネタイプのジョイントです。 |
Wheel Joint 2D | 転がる車輪の動作をシミュレートします。サスペンションの “バネ” が、“車両” 本体からの距離を維持します。 |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.