ios - Add SKNode as trigger so that it does not affect other node's path -


so, wondering if possible add skspritenode , give physics body/properties such functions trigger. can thought of finish line in race. when pass line, point or something, path not physically/visually affected; pass right through it. sure possible, however, not know how achieve this. here have sprite:

var revolutionbar = skshapenode(circleofradius: 25) revolutionbar.alpha = 1 revolutionbar.fillcolor = skcolor.bluecolor() revolutionbar.physicsbody = skphysicsbody(circleofradius: 20) revolutionbar.physicsbody?.affectedbygravity = false self.addchild(revolutionbar) 

what should add want achieved?

assuming trying achieve fire off function after passing line, first setting skspritenode have categorybitmask , collisionbitmask.

next write didbegincontact function in swift file , handle conditions checks right nodes trigger event.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -