I would expect False, True, True.
Let’s have a look at the first one. You print out the boolean value rayhit.isEmpty(). So getting a hit will print ‘False’.
You set the custom filter expression like this
self.scene.setFilterConstant0(PhysxGroupsMask.allOff())
self.scene.setFilterConstant1(PhysxGroupsMask.allOff())
self.scene.setFilterOps(op0 = self.scene.FOOr,
op1 = self.scene.FOOr,
op2 = self.scene.FOAnd)
self.scene.setFilterBool(True)
From the NVIDIA docs:
Now, using your setting, you have:
(G0 or 0000...) and (G1 or 0000...) = True
For the box you set GROUPSMASK1, which is ‘100000000000…’,
and for the ray you also set GROUPSMAKS1. Inserting these values for G0 and G1 gives:
(1000.. or 0000...) and (1000... or 0000...) = True
or
true and true = true
This is true, so your ray scores a hit for the box. And raycase.isEmpty() will return ‘False’
This is what I get when running your script.