Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | jarlowrey |
void set_collision_layer_bit( int bit, bool value )
Set/clear
individual bits on the layer mask. This makes getting an area in/out
of only one layer easier.
void set_collision_mask_bit( int bit, bool value )
Set/clear
individual bits on the collision mask. This makes selecting the areas
scanned easier.
What is the bool for?
This thread makes it look like the bool is for using decimal (instead of binary) numbers.
What is the max decimal number we can use: 32, 20, or something else?
Edit: I ask about the max index because the docs state
int collision_layer - The area’s physics layer(s). Collidable objects
can exist in any of 32 different layers. A contact is detected if
object A is in any of the layers that object B scans, or object B is
in any layers that object A scans. See also collision_mask.