I am making a game in Cocos2d. I have enemies that shoot, and have the character shoot. I created a separate layer for the enemies (and their bullets) and a separate layer for the character (and its bullets). The problem is, I don’t know how to detect collisions between the two layers. Note, I have the Scene in HelloWorldLayer, and each of the above layers is a child of the scene. Any help is appreciated. Thanks!
Share
Why not create the bullets on the opposite layer from the bullet source, i.e. layer A is the character and the enemy bullets, layer B is the enemy and the character bullets? Then your collision detection would be on the same layer.