multi-part Actor

I’ve gone through the forums, I cannot get multi-part Actor to work.

I have my torso, I have an arm, I’ve named the joint in both the same ‘RShoulderJoint’

self.Zombie = Actor(
            },mergeLODBundles = False )
        self.Zombie.exposeJoint(None, 'self.zTorso','RShoulderJoint')
        self.Zombie.exposeJoint(None, 'self.zRArm','RShoulderJoint')

:Actor(warning): RShoulderJoint not found!

I’ve tried it with ‘mergeLODBundles = False’ and without, I’ve ‘egg-optchar’ed’ and without.

I looked in the eggs, it’s in there.

multi-part Actors are very particular, poorly explained, and hard to get right the first try. We could spend some time ironing out the details so that you get it right, but are you sure that you really want multi-part Actors? Few people do. Polygons cannot cross the gap between the two parts, so it means that your arm will have to be interpenetrating your torso, rather than properly skinned. This can be an acceptable look for a robot or a toy, but rarely for a human.

What is more commonly wanted is subpart Actors, where all of the joints and polygons come from one model file, but the different joints have different animations applied to them. This way, you can play the “fire gun” animation on your arm while the torso is playing the “walk forward” animation. This has nothing to do with multi-part Actors.

So, which effect are you ultimately trying to achieve?


This is my test run, I want a zombie that can lose his parts when hit, have them fall off and land on the ground. The interpenetration is fine as long as it can fall apart. If there was another way, that would be good too. But I’ve worked on it for so long, whether it’s what I need or not, now I just want to get it to work. Plus I’ll learn something along the way.

A common way to do this is to just hide the part that falls off and spawn a new model equivalent to that part.

I didn’t know I could hide part of an actor?

Sure, just have multiple meshes in your Actor’s EGG file. This way you can use skinning to make everything move together and it will appear to the viewer as a single piece.

You can certainly hide part of an actor; use egg-optchar -flag arm=arm (or whatever your arm geometry is called) to make it a separate piece that can be hidden (or textured, or colored, or whatever).

But to answer your original question about multi-part actors, I think it will help to use the -expose option to egg-optchar, instead of exposeJoint(). This will not only expose the joint but it will leave it a child of the partbundle, which is what Actor.attach() expects to find. Use egg-optchar -expose RShoulderJoint to achieve this. You only need to expose the joint on zombieTorso, not on zombieRArm05. Note that it’s also important to strip the joint animation from zombieRArm05 independently; egg-topstrip can do this if you haven’t already done it in your animation package.