Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseThe Distance Joint 2D component allows two Sprite objects controlled by rigidbody physics to be attached together to keep them a certain distance apart. Note that unlike the Spring Joint 2D, the Distance Joint applies a hard limit rather than a gradual force to restore the desired distance.
プロパティ: | 特徴: |
---|---|
Collide Connected | つながった二つのオブジェクトが互いに衝突できるか |
Connected Rigidbody | ジョイントの接続先の Rigidbody2D オブジェクト。null の場合,スプリングの端は固定 |
Anchor | スプリングがアタッチされた端のローカル座標 |
Connected Anchor | スプリングの端がアタッチされた他方のオブジェクトのローカル座標 |
Distance | 二つのオブジェクトをつねに一定距離だけ離す |
Max Distance Only | If enabled, the joint will only enforce a maximum distance (ie, the objects can still move closer). If disabled, the distance between the objects will be fixed. |
バネでつながったオブジェクトは両方とも Rigidbody 2D コンポーネントをアタッチする必要があります(あるいは,バネの他方の端を固定するには Connected Rigidbody を null にします)。ジョイントの端はオブジェクトに対して相対的に回転できますが,それらの間の距離は固定されます。