How to find the transformation given a games object' transforms in two coordinate system

Let’s say, I have a game object in the space. And I know the positions and rotations in two different coordinate systems.

For example, the position and rotation of this game object in local space (let’s say relative to another game object) is P_l and R_l, which is a vector and a quaternion respectively.

Similarly, the position and rotation of this game object in the world space is P_w and R_w.

How should we find out the transformation from local space to world space? (algorithmically or leveraging Unity API). By leveraging the computed transformation, my goal is the transform the position and rotation of any game objects in the local space to the world space.

This is somewhat similar to the Unity transform API:

Y = transform.transformPoint(X);

However in our case, we know the details of X and Y, and want to find out transform?

Thank you so much! Any suggestions would be helpful!

Hello @chc004 .

Transform component values can be defined (or re-definded) by changing the Space property.

What you did to calculte the position in worldspace or relative to an object can be easy done using

Read the documentation, look for examples on unity answers or tutorials on youtube if dont know how to use it, but is really simple.

BYE!