It seems to me that mesh.add() is going to keep changing the parent submesh of each root bone each time a different submesh is iterated over in the parent (submeshes) forEach. That doesn't sound right to me. Why add to something if it's going to be overwritten immediately?
Is the rootBone property of the submesh entry a pointer to the correct bone index to add to the mesh? I gave that a shot and it deformed the Northrend Penguin skeleton in a weird way. I don't really understand the difference between rootBone and startBone in the submesh definition from the M2, though.
I'm a bit unclear if this line is correct: https://github.com/timkurvers/wowser/blob/master/src/lib/pipeline/m2/index.js#L116
It seems to me that
mesh.add()
is going to keep changing the parent submesh of each root bone each time a different submesh is iterated over in the parent (submeshes)forEach
. That doesn't sound right to me. Why add to something if it's going to be overwritten immediately?Is the rootBone property of the submesh entry a pointer to the correct bone index to add to the mesh? I gave that a shot and it deformed the Northrend Penguin skeleton in a weird way. I don't really understand the difference between rootBone and startBone in the submesh definition from the M2, though.