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 = 40.0
contact_monitor = true
max_contacts_reported = 4
max_contacts_reported = 10
script = ExtResource("1_pojcu")
[node name="Asteroid" type="Sprite2D" parent="."]
texture = ExtResource("2_gv6mu")
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
polygon = PackedVector2Array(55, 3, 35, -20, 34, -40, 1, -49, -35, -52, -55, -29, -58, -1, -48, 30, -22, 53, 13, 58, 40, 30)
scale = Vector2(0.95, 0.95)
polygon = PackedVector2Array(55, 3, 35, -20, 34.7368, -43.1579, 1, -49, -34.7368, -54.7368, -55.7895, -30.5263, -58, -1, -46.3158, 33.6842, -23.1579, 55.7895, 13.6842, 61.0526, 42.1053, 32.6316)
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionPolygon2D2" type="CollisionPolygon2D" parent="Area2D"]
scale = Vector2(0.95, 0.95)
polygon = PackedVector2Array(63.1579, 2.10526, 41, -21, 41.0526, -43.1579, 35.7895, -48.4211, 6.31579, -51.5789, -1.05263, -54.7368, -37.8947, -57.8947, -58.9474, -31.5789, -61.0526, 0, -48.4211, 36.8421, -25.2632, 58.9474, 13.6842, 64.2105, 45.2632, 33.6842)
[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"]