How to initially place objects assuming a constraint

When connecting objects with Constraint, such as HingeConstraint, if the initial placement is not set up well, the objects often scatter with the momentum of moving to the connection position.

As a countermeasure, we want to initially place the object at the position to be connected.

When the objects are connected in order A->B->C->D,

we need to make sure that the initial position and angle of B is determined based on the initial position and angle of A.

The same goes for C and D.

I am trying to figure out how to calculate this, but I don’t know.

Specifically, I want to set object A to (x=Math.PI / 4, y= Math.PI / 4, z=0) and place object B at (x=2, y=0, z=0) of object A, also based on the rotation of object A.

Is it possible for you to tell me about the calculation method?

when I add constraints, I usually try to set them up with 90deg angles, as much as possible. Like T pose for skeleton. Is it possible in you case to place the objects in such way that angles get more easily setup?

@Cedric
Cedric san Thanks for your reply.

I’m thinking of placing several things like the linkage mechanism composed of several parts as we discussed the other day.
I am thinking of placing them at an angle.

It would be good if it could be placed like a T-pose, but since it is part of a larger mechanism, it is difficult to change the angle once to 90 degrees.

Since the constraint itself is a local coordinate system for each object, we think it is essential to be able to obtain the coordinates of other objects from the coordinates and angles of the base point.
A->B

It’s part of our roadmap to display (and possibily tweak, in a second step) the constraints to make it more easy for setup.
but, for now, there is nothing better than try/retry :frowning:

It’s part of our roadmap to display (and possibily tweak, in a second step) the constraints to make it more easy for setup.

I appreciate it very much.

but, for now, there is nothing better than try/retry

I agree with this.

I tried a little harder and was able to do the following, it looks like I probably did what I set out to do.

The point was not to follow “A->B->C” in order,
It was all about finding the coordinates from A, which is the reference.

Even when I didn’t use physics, I was able to place the objects where I wanted them to connect.

Thanks for the advice!