setup weapon mask and layer to detect collisions main
authorEduardo <[email protected]>
Thu, 23 May 2024 17:16:31 +0000 (19:16 +0200)
committerEduardo <[email protected]>
Thu, 23 May 2024 17:16:31 +0000 (19:16 +0200)
components/base_weapon/BaseWeapon.tscn

index 4c5032e58e524f9e454475cf35fcca5e937746a6..40b86ec9c906de8ad2fbc239e440bd24b2f2671e 100644 (file)
@@ -6,6 +6,8 @@
 radius = 4.96679
 
 [node name="BaseWeapon" type="Area2D"]
+collision_layer = 4
+collision_mask = 2
 script = ExtResource("1_4h33d")
 
 [node name="Polygon2D" type="Polygon2D" parent="."]
@@ -21,4 +23,5 @@ shape = SubResource("CircleShape2D_e6hu6")
 [node name="FireTimer" type="Timer" parent="."]
 one_shot = true
 
+[connection signal="body_entered" from="." to="." method="_on_body_entered"]
 [connection signal="timeout" from="FireTimer" to="." method="_on_fire_timer_timeout"]