Heyhey, my attempts to combine bitmasks, let’s say (1<<10) and (1<<11), are failing constantly. I want that the mask returns true when the object with the layer 10 or the object with the layer 11 get masked, for example when my raycast hits the layer 10 or 11.
(1<<10) || (1<<11) doesn’t work, it seems. How to?
try (1<<10) | (1<<11)
maybe try (1<<10 || 1<<11)
the operator || (or) just checks if either of the two numbers does not equal 0, so in this case (1<<10) || (1<<11) would return the boolean value true, instead of an integer bitmask. the operator | (bitwise-or) compares each bit of both numbers and returns 1 if either of them is 1, the result is an integer value. in this case you could probably even use (1<<10) + (1<<11), which, if i didn’t make a mistake here, should equal 1024 + 2048 = 3072
“|” made the trick! Thanks for the detailed explanation dbp =)