Godot Version
4.3
Question
Is there a one liner for clearing all layer masks, and layers?
func clear_masks():
for i in range(32):
self.set_collision_layer_value(i + 1, false)
self.set_collision_mask_value(i + 1, false)
4.3
Is there a one liner for clearing all layer masks, and layers?
func clear_masks():
for i in range(32):
self.set_collision_layer_value(i + 1, false)
self.set_collision_mask_value(i + 1, false)
In resume, layers/masks are just int’s, you can set them to zero to clear all of them.
collision_layer = 0
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.