collision fix

This commit is contained in:
2025-09-08 22:19:06 +02:00
parent f91ae53533
commit cb4a68898b
7 changed files with 56 additions and 13 deletions

View File

@@ -8,14 +8,23 @@ collision_layer = 3
collision_mask = 3
mass = 10.0
contact_monitor = true
max_contacts_reported = 4
max_contacts_reported = 10
script = ExtResource("1_ka8bu")
[node name="Asteroid" type="Sprite2D" parent="."]
texture = ExtResource("2_e2m2r")
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
polygon = PackedVector2Array(16, -23, 3, -29, -11, -27, -22, -12, -27, 2, -25, 21, -6, 30, 17, 23, 23, 10, 29, 1, 20, -8)
scale = Vector2(0.95, 0.95)
polygon = PackedVector2Array(16, -23, 3, -29, -11, -27, -22, -12, -27.3684, 1.05263, -25.2632, 21.0526, -6, 30, 17, 23, 23, 10, 29, 1, 20, -8)
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionPolygon2D2" type="CollisionPolygon2D" parent="Area2D"]
scale = Vector2(0.95, 0.95)
polygon = PackedVector2Array(34, 0, 22, -11, 17, -25, 2, -33, -12, -30, -26, -14, -31, 2, -28, 24, -6, 34, 19, 25, 26, 12)
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="body_exited" from="." to="." method="_on_body_exited"]
[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"]
[connection signal="body_exited" from="Area2D" to="." method="_on_area_2d_body_exited"]