ios - Where find contactPoint between 2 physics bodies ? -


i'm trying display label contact between physics bodies occurred can't find it. can me? thank you

i find myself how display label on contact position between 2 physics bodies. secondbody.node called 'balloon' can follow , use position.

if ((firstbody.categorybitmask & flechettecategory) != 0 && (secondbody.categorybitmask & bluecategory) != 0)     {         flechedidcollidewithblueballoon(firstbody.node skspritenode, balloon: secondbody.node   skspritenode)     } 

return function :

func flechedidcollidewithblueballoon (fleche: skspritenode, balloon: skspritenode) {     self.runaction(skaction.playsoundfilenamed("eclate.mp3", waitforcompletion: false))      println("blue")     fleche.removefromparent()     balloon.removefromparent()      bluedestroyed++      //dysplay +1     labelscoreb.position = balloon.position     addchild(labelscoreb)      let moveaction = skaction.moveby(cgvector(dx: 0, dy: 3), duration: 0.3)     moveaction.timingmode = .easeout     labelscoreb.runaction(skaction.sequence([moveaction, skaction.removefromparent()]))      self.scoreblue.text = string(self.bluedestroyed)   } 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -