+1 vote

Documentation about Joints is scarcely described. I found in Godot C++ sources that e.g. PinJoint class stores pivots for each object, but I can't find anything about objects' connection locations in GDScript object in editor.

1. How to set objects' pivots for joints? It pivots in local origin (0, 0, 0) all the time.
2. Does joint's translation (transform in general) mean anything?

in Engine by (26 points)

1 Answer

+1 vote

not sure I understand the problem but I struggled with joint times ago (can be inaccurate).

1 :
position of the joint itself define the pivot center of rotation, you have to place it where it need to be

if I remember well the "pivoted" objects will be "attached/bonded" to the pivot by there origin.

at last, pivot node itself should not be a child of neither of the 2 rigid bodies (ex: on the same "level")

in general consider the joint as an object itself which has constraint with 2 others
(both bonded objects have equal relationship with joint, it is not one attached to the other one, it is both attached to joint)

2 :
translation : to place the center pivot
orientation : you will may want to block, hinder some axes so orientation will matter
scale : I don t even want to know what it does

by (114 points)
  1. > position of the joint itself define the pivot center of rotation
    center of rotation of which of two bodies? We have two bodies connected, each has its own pivot center.
  2. Why joint should not be attached as a child to one of two bodies? I tested a bit and there is no difference seen so far. Moreover, there is asymmetric behavior with combination of RigidBody-StaticBody. I remember that with some choice one option allows rotation of rigidbody, the second does not.
  3. translation and orientation of joint: the same, for which of two bodies does it apply?
    Thanks in advance and sorry for misunderstanding anything.
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.