A subpart is a subsection of the joints in an Actor
. Think of it like a grouping of some of the joints of the Actor
that excludes the rest of the joints. Creating subparts doesn't actually change the Actor
at all; it just creates a grouping that we can use when we want an animation to only affect a specific subset of joints. To create a subpart, we just need to call the makeSubpart()
method of the Actor
:
myActor.makeSubpart("SubpartName", [Included], [Excluded])
We pass three arguments into the makeSubpart()
method:
The first is a name for the subpart that we can use to identify it later
The second is a list of joint names for the joints we want to include in the subpart
The third is a list of joint names for the joints we want to exclude from the model
We can find these joint names if we open Kid.egg
and scroll down to the bottom. Here's a joint entry for a joint called Chest
, for reference:
<Joint> Chest { <Transform> { ...