[Solved]Using Actor.makeSubPart to make multipart Animation?

Hello All,

I’m using some multipart Actors to have things like :

  • legs are running while upper body is aiming the gun and head is looking toward the ennemy.

So far i have used (with success) the methods described in CVS “How to make Multiparts Actors.txt”. But it’s a lot of works ahead of the game.

Is it possible to do the samething by using makeSubPart on a whole actor?

If :

  • i 've loaded an full actor
  • i 've created two animation (run and aim) on the whole actor
  • i’ve defined some subparts like “upper_body” and “lower_body”
    Can i play the “run” animation on lower_body and the aim animation on upper_body without system blending between those two animations?
    (i think i need to setPartComplete to false to do so)

Additionnal questions : must makeSubPart being called at loading time or can it be called at anytime during the game afterward?

Yes, you can do this! I trust that by the time you read this reply you have already tried this and discovered that it works. Please let me know if you had difficulties.

The makeSubPart() interface was added some time after the document “how to make multipart actors” was written, so that document has no mention of this interface. But you can use this interface as you describe: you simply define the subset of joints that make up each subpart, and then you can play the animations on each subpart independently. You don’t particularly need to set the subpartsComplete flag one way or another, unless you intended also to apply an animation to the root of the hierarchy, and then the difference between subpartsComplete true or subpartsComplete false is very subtle.

I believe it is possible to call makeSubPart() at any time, not strictly at load time.

David