ios - SKSpriteNode : Handling Collision during SKAction -


i'm making little game, , i'm stuck following problem.

i'm running action (followpath type) on particular node :

let followtrack: skaction = skaction.followpath(ballpath!.cgpath, duration: action_speed) movingball.runaction(followtrack) 

but during animation, if node collide 1 (like wall exemple), animation stops , there no collision animation.

i tried things :

func didbegincontact(contact: skphysicscontact) {     var firstbody: skphysicsbody = contact.bodya     var secondbody: skphysicsbody = contact.bodyb      firstbody.node?.removeallactions()     secondbody.node?.removeallactions() } 

but there no collision either (i guess that's because velocity (0,0))

is there anyway handle case ? (i don't need swift answer, objective-c or generic answer great !)


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -