I have a game object which contains a HingeJoint2D and a RigidBody2D. I’ve also attached the following debugging script:
void FixedUpdate() {
if (Input.GetKey(KeyCode.Space)) {
GetComponent<Rigidbody2D>().AddForce(Vector2.up * 100f);
Debug.Log(GetComponent<Rigidbody2D>().velocity);
}
}
I’ve found that when I have the HingeJoint2D enabled, the script does not add force to the RigidBody2D. However, if I disable the HingeJoint2D, the script adds the force as expected.
Why is this?