| Parameter | Description |
|---|---|
| bitIndices | The indices of the bits to set in the mask. An index must be in the range [0, 63]. |
Create a PhysicsMask by specifying multiple bits to set (1).
Each value is the index of a single bit to set, not a mask of bits.
An integer that holds a layer mask, such as the value of a LayerMask, is not converted here and is read as a bit index instead.
For example, a layer mask with only layer 8 set has the value 256, which is read as bit index 256 and throws an exception, and a layer mask of 3 sets bit 3 rather than bits 0 and 1.
To create a PhysicsMask from a layer mask, pass the LayerMask itself to PhysicsMask.PhysicsMask.
If the layer mask is held in an integer, convert it first, for example new PhysicsMask((LayerMask)layerMaskValue).
| Parameter | Description |
|---|---|
| layerMask | The LayerMask to use. |
Create a PhysicsMask from a LayerMask. A LayerMask is only 32-bits wide so the PhysicsMask will have the upper 32-bits set to zero.