Posts

Post not yet marked as solved
0 Replies
380 Views
Hello!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 thisSkScene (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) print(id,anAnimation) }) }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!
Posted
by Acrisio.
Last updated
.
Post not yet marked as solved
7 Replies
1.4k Views
Hello everybody!im making an ARPG using mainly SkNodes, SkSpriteNodes and SKPhysicBodyi have a SKpriteNode for the characters and i'm trying to get the logic for the atacks, for wich i make a new SkShapeNode with physicsBody and some creeps with SKspriteNode and SkPhysicsBody.My idea is to check when the atack colides with any creeps and apply some effects.So far is working right, but the problem is that the atack will overlap with the creeps some times (character is near creep and spawns an atack)and the creeps will move because of the contact.Any ideas on how i can trigger an event when some contact happen but without having the objects to move because of the colission?Thanks!.
Posted
by Acrisio.
Last updated
.