# What is the calculation method of the matrix of the thin instance and the parent element?

I want to add a thin instance to the position of the box, how do I need to convert the world position?

What you want to calculate is `T` so that :

`T*W = W*Tx`

where `W` is the world transformation of the mesh for which you’re creating thin instances.

The left side of the equality is because a thin instance is always transformed by the matrix of its parent mesh, so what you see on the screen is `M*W`, where `M` is the matrix of a thin instance.

As you want the 2nd car visually to be simply a translated version of the 1st car, you want to use `(I*W)*Tx` for the right-hand side of the equality. `I` is the matrix of the first thin instance, which is the identity (since you used `thinInstanceAddSelf` to create it) => `(I*W)*Tx = W*Tx`

=> `T*W = W*Tx` gives `T = W*Tx*W-1`

Here’s the corresponding PG:

2 Likes

Thanks for the answer, can I understand that the thin instance is the sibling node of the source instance

Please forgive me for not understanding this transformation very well . If the parent node has a matrix transformation, how can I calculate the position of the thin instance at the world coordinate position I specified.

I seem to understand. Is this pg idea correct?

I’m not sure what you call the source instance. The thin instances are children of the mesh they are created for, as the world matrix of this mesh is factored in to calculate the final matrix of each thin instance.

It seems ok to me!