Binding a mesh to a skeleton will cause the mesh to transform according to the skeleton matrix
What’s the best way to force the mesh to maintain its vertex transforms before and after binding? I supposed I would need to somehow compute the vertices positions before binding, cache it and ‘restore’ it manually after binding?
I believe you are having a problem because the mesh that you want to bind the skeleton with and the transforms node that are linked against the skeleton have different roots. This will make so that the bind matrix applies the inverse transformation between the root skeleton transform node and the box mesh to the box mesh vertices.
If they both have the same parent this issue will not happen. (As you can see in the image attached)
I have modified your playground by adding a setParent to the box mesh, and than set the position, rotation and scaling for the box back to the values they had before binding.
Thanks a lot @srzerbetto , yea I know about that, but I was wondering if there was a way to bake the vertices without dealing with reparenting and setting scales etc
EDIT: Ok yep it works, I guess this PG would be a bit less confusing
The one in the solution showed the box moving (due to the bake being called before the skeleton binding) which could be confusing to some new to the topic