Reparent to child node preserves transform


So I’m trying to transform a part of a 3d model, something like:

np = mymodel.find("**/FootL")
np.setH(np, 1)

I expected this to rotate around the origin of the ‘FootL’ mesh in my model, but instead it rotates the foot around the ‘mymodel’ origin.

I’m also creating models with joints which various other nodes can be reparented to, which work well, until I start rotating anything, since it rotates around the incorrect origin. Eg:

np = mymodel.find("**/Joint")
weapon.setH(weapon, 1)

Is there a way to get the transform between a parents child node, so I can perhaps get around this? (np.getPos(mymodel) seems to give zero)

Dummy nodes perhaps could be created, but I’m a bit wary of the amount of dummy nodes per model I’ll need to have.


This is probably the result of flattening of the mesh. The node in question can be tagged with egg-optchar so that it retains its transform.