I have two different .scn files with two different parent node with multiple childnodes. I have implemented collision delegates methods and it is getting called correctly. My intention is to find collision only if any child node from second .scn file collides with any child node or root node of first .scn file or vice versa.
But right now since in both the .scn files, all child nodes are closely placed, these delegates are always getting called providing contact.nodeA and contact.nodeB as two child nodes that collide with each other from same .scn file.
Is it possible to detect collision only if contact.nodeA is from different .scn file(can be any child node) and contact.nodeB is from different .scn file(can be any child node)?
Also i may add the node from first or second .scn file multiple times to the same scene. In this case it should detect collision between nodes of these two .scn files even if they are from same .scn file (added two times to scene), since i am adding it two times as a separate object
I have set the categorymask, collisionmask and contact mask as 1 in Xcode scene editor and have set the physics body to kinematic for all the child and root nodes of both the .scn files.