Ok, didn’t notice the “not”.
Something else I didn’t notice is that you use the 128-bit masks filtering (groupsMasks), but you don’t provide 1111111 for the mask itself. You use
group0 = PhysxMask.allOff()
If using 128-bit masks this should be the default value for the “mask” parameter
group0 = PhysxMask.allOn()
You can cose between two methods when raycasting:
(1) Use actor.getShape(i).setGroup() and use the “group” parameter of the raycast to pass a mask of groups.
(2) Use actor.getShape(i).setGroupsMask() and use the “groupsMask” parameter of the raycast. Leave the parameter group at it’s default value PhysxMask.allOn.
By the way:
self.boxActor.setGroup(0)
This sets the “actor group”, which is not related to shape group (first option above) or shape groupsMask (second option above). I know this might be a bit confusing since PhysX offers four or five different mechanisms to filter collisions.