0 Replies
      Latest reply on Oct 20, 2019 8:03 PM by Acrisio
      Acrisio Level 1 Level 1 (0 points)


        im having some troubles trying to see the animations of a scene and run them into a SKScene. the estructure for my app would be something like this

        SkScene (tilemap, logic, etc) ---> Scene (3D animated model for player and monsters)

        im trying to use the animations from 3D models that i'm downloading, to do so i'm converting them into a .scn (currently trying with .dae and .obj)


        so far im not able to list the animations of the models in any way (but im able to load the model in a scene and then load that scene into the SkScene with a SK3DNODE)

        i tried this piece of code to see if there's any animation on the .scn and im not seeing anything in the list. Dont know if there is no animation or i'm not able to see them.


         var sceneUrl = Bundle.main.url(forResource: "obj/Wolf_obj", withExtension: "scn")!
                if let sceneSource = SCNSceneSource(url: sceneUrl, options: nil){
                    let caAnimationIDs = sceneSource.identifiersOfEntries(withClass: CAAnimation.self)
                    caAnimationIDs.forEach({id in
                        let anAnimation = sceneSource.entryWithIdentifier(id, withClass: CAAnimation.self)


        Anyone has any experience in something like this? looking into internet it seems that there is very few info about the topic.

        thanks in advance!