Play an animation of BodyTrackedEntity as in Xcode usdz preview

Hello,


I have a BodyTrackedEntity with an orb that rotates around the skeleton. This plays if I bring up the usdz in Xcode and click the play button. The orb appears in the scene graph.


Scene graph

aceg

Icosphere <- the orb

biped_aceg_skeleton

biped_aceg_staticMesh


the availableAnimations is empty.


How can I play the Icosphere so it rotates around the skeleton like it does in Xcode ?


Thank you

Replies

Ok, I have found a way to get the information.

                            if let referenceNode = SCNReferenceNode(url: sceneURL) {
                                referenceNode.load()
                                let iconsphere: SCNNode = (referenceNode.childNodes.first!.childNodes.first!.childNodes.first!.childNodes.first)!
                                let transformAnimationKey = iconsphere.animationKeys.first
                                if let animationPlayer = iconsphere.animationPlayer(forKey: transformAnimationKey!) {
                                    animationPlayer.paused = false
                                    animationPlayer.animation.isRemovedOnCompletion = false
                                    animationPlayer.play()
                                }
                            }

Now if there are any suggestions on how to get this to play, it would be appreciated.

The solution that I was able to get work was to have the animation exported as a usdz file and bring that directly into Reality Composer.