Search code examples
cocos2d-iphonespritebuilder

How to have two physics sprites not collide in spritebuilder?


I'm using Spritebuilder and I have two nodes that are using physics and I want them to just ignore each other. The two nodes are player 1 and 2, I don't want them to do anything when they collide but I still want them both to collide with other objects and so using a sensor body won't work.

Does anyone know what I can do?


Solution

  • Have a look at the docs. Basically, all you have to do is to add both nodes to the same collision group. You can do this either in Spritebuilder (in the physics properties tab) or in code.