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