This is really weird. AddRelativeForce() always causes my objects to move along their negative Z axis, but only when they’re connected by joints.
I have three rigid bodies arranged in a triangle and bound together using fixed joints like so (an ‘*’ is a rigidbody and ‘<—’ is a joint):
*<------*
\ /
\ /
>*<
So one (upper-right) has two joints, one connecting it to the other two. Another (upper-left) has one joint connecting to the bottom one, and finally the bottom body has no joints.
I’m applying forces (via AddRelativeForce()) to the top two bodies, among them, a forward force (Vector3.forward * coef). This works as expected when the bodies are separate, but when joined with joints, no matter what value I send to AddRelativeForce(), they always move along their negative Z. Well, let me amend that, it moves in proportion to the magnitude of the vector I pass to AddRelativeForce. So if it’s zero, they don’t move. But as the magnitude increases, it moves in the negative Z, regardless of the direction of the vector passed.
Any ideas of what could possibly cause this? I’ve been banging my head against a wall on this for hours now!