I’m trying to add custom clothing to a skinned character through script so it uses the original meshes bones instead of it’s own duplicated ones.
I have a character that I’ve rigged and animated. I also have some extra clothing that is rigged to the same skeleton and exported separately, but when I instantiate it in game at run time, I’d like to optimize it so it uses the characters skeleton instead of it’s own.
Any pointers on how to go about this or perhaps a tutorial I’ve missed?
Despite me reporting it for several years now, the triangles are still wound backwards so the above example when dropped into a blank scene will show absolutely nothing to the default camera. :facepalm:
To fix, replace the triangle array allocation with:
// wind the triangles to face the default camera FFS
mesh.triangles = new int[] { 0, 2, 1, 1, 2, 3 };