I have a background object that should not interact with anyone. I can’t perform a regular touch test, because event.object2 returns a table

 local obj1 = event.object1 local obj2 = event.object2 if((obj1.myName == "asteroid" and obj2.myName == "rocket") or (obj1.myName == "rocket" and obj2.myName == "asteroid")) then --my code end 

There was an idea to disable the possibility of collisions with an unnecessary object for me, I tried to implement it by adding the groupIndex parameter

 physics.addBody(rocket, "dinamic", {bounce = 0.5, groupIndex = 5}) physics.addBody( asteroid, "dinamic", {bounce = 0.2, groupIndex = 5} ) 

But the problem remained.

    0