Godot Version
4.2
Question
If set raycast parameter query.collision_mask = 4
, raycast should only hit/detect staticbody on layer 4, right?
4.2
If set raycast parameter query.collision_mask = 4
, raycast should only hit/detect staticbody on layer 4, right?
No, collision masks and layers use a bitset to store the data. The editor shows numbers ordered by their binary offset. To query layer 4
it must equal 0b1000
or 16
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.