Search code examples
iosscenekitarkitcollada

SceneKit Collada animation with child node


I have an imported DAE file in SceneKit and am trying to add a particle system to it. It's a cigar smoking character and I want smoke to appear from the end of his cigar. Like this: enter image description here

The problem is, when his animation begins, the particle system doesn't move with the cigar, despite the fact it is a child of the cigar node.

enter image description here

What am I missing here?


Solution

  • I figured it out. Two things that need to happen:

    • The node has to be a child of the node that is being animated, which in this case is the node with the bones as the character was rigged.

    • Also, in the particle system you need to make sure the emitter is set to world space so it doesn't rotate with the parent node (smoke would always rise vertically regardless of the rotation of the head).

    enter image description here