Joint pivoting

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By GlaDos28

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?

:bust_in_silhouette: Reply From: Asoth

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

  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.

GlaDos28 | 2018-11-15 00:40