附加到 Joint2D 的 Rigidbody2D。
Joint2D 会自动附加到与 Joint2D 处于相同 GameObject 上的 Rigidbody2D。
另请参阅:Rigidbody2D。
using UnityEngine;
using System.Collections;
public class ExampleClass : MonoBehaviour
{
public Vector2 force = Vector2.up;
void Start()
{
// Apply a force to the rigidbody attached to the joint.
GetComponent<Joint2D>().attachedRigidbody.AddForce(force);
}
}