See the video. I have a hinge joint motor and whether I set the “force” to 50, or 50,000, it seems to behave the same way. In the video, the weight of a few tennis balls are stopping the motor regardless of the force. The weight of the tennis balls is 3kg, which I know is more than a real tennis ball, but still it seems like changing the force value should change the behavior, and that a large force value should be able to overcome the weight of a few balls.
Does anyone have any thoughts about what I’m doing wrong? Thanks.
The code:
HingeJoint hj = hingeObject.GetComponent<HingeJoint>();
if (!hj) { hj = hingeObject.AddComponent<HingeJoint>(); }
hj.connectedBody = connectedBodyRigidbody;
hj.anchor = new Vector3(0f, 0f, 0f);
hj.axis = new Vector3(0f, 1f, 0f);
hj.connectedAnchor = new Vector3(0f, 0f, 1f);
hj.useMotor = true;
JointMotor jm = hj.motor;
jm.targetVelocity = targetvelocity;
jm.force = force*50f;
Debug.Log("jm.force=" + jm.force); //this prints "50000" when I use force=1000