Friction Joint 2D は、Rigidbody 2D の物理計算によって制御されるオブジェクトを接続します。この Friction Joint 2D は、オブジェクト間の直線速度と角速度を、ゼロまで減らしていきます (つまり、スローダウンさせます)。
プロパティ | 機能 |
---|---|
Enable Collision | このプロパティを有効にすると、つながれた 2 つのゲームオブジェクトの衝突が可能になります。 |
Connected Rigid Body | このジョイントと接続するもう 1 つのオブジェクトを指定します。ここを None にすると、もう一方の端が、Connected Anchor プロパティによって定義された空間の点に固定されます。入力欄の右側にある丸いアイコンを選択すると、接続先オブジェクトのリストを見ることができます。 |
Auto Configure Connected Anchor | このプロパティを有効にすると、このジョイントが接続する他のオブジェクトのアンカー位置が自動的に設定されます。このプロパティを有効にすると、Connected Anchor プロパティの座標を入力する必要はありません。 |
Anchor | ジョイントの端点がこのゲームオブジェクトの (Rigidbody 2D の X、Y 座標の) どこに接続するかを定義します。 |
Connected Anchor | ジョイントの終点が他のゲームオブジェクトに接続する位置 (Rigidbody 2D 上の x、y 座標) を定義します。 |
Max Force | 接続したオブジェクト間のリニア(直線)動作を設定します。値が高いとオブジェクト間の直線的な移動が制限されます。 |
Max Torque | 接続したオブジェクト間の角(回転)動作を設定します。値が高いとオブジェクト間の回転動作が制限されます。 |
Break Action | 力またはトルクのしきい値を超えた時に実行されるアクションを設定します。 |
Break Force | 力のしきい値を設定します。このしきい値を超えると、ジョイントが、選択された Break Action を実行します。デフォルト値は Infinity 設定されており、これは超えることができません。したがって、しきい値がこの値のままである場合は Break Action は実行できません。 |
Break Torque | 力のしきい値を設定します。このしきい値を超えると、ジョイントが、選択された Break Action を実行します。デフォルト値は Infinity 設定されており、これは超えることができません。したがって、しきい値がこの値のままである場合は Break Action は実行できません。 |
Friction Joint 2D は、 2 点間での動きを徐々にスローダウンさせてから停止したい場合に使います。ジョイントの目的は、 2 点間の相対的な線形および角度のオフセットを、0 にして維持することです。これら 2点には、Rigidbody2D コンポーネント 2つか、Rigidbody2D コンポーネントとワールド空間の固定位置の組み合わせを使う事ができます (ワールド空間の固定位置に接続する場合、Connected Rigidbody を None に設定してください)。
ジョイントは両方の Rigidbody 2D 位置に直線的な力 (Force) と回転力 (Torque) を加えます。モーターの力を弱く(そのため、抵抗力も弱い) 事前設定した疑似モーターを使用します。抵抗力は弱くも強くも変更できます。
抵抗力を強くする場合
抵抗力を弱くする場合
Friction Joint 2D には以下のとおり2つの同時に満たさなければいけない制約があります。
このジョイントを使うと摩擦があるかのような反応をする物理オブジェクトを構築することができます。それらは互いに直線的か角度的に、またはその両方で、抵抗します。以下はその例です。
FrictionJoint2D
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.