princesse/detection_sol: ajout d'un deuxième ray cast

Un par pied, permet d'avoir un meilleur feeling pour rebondir au bord
d'une plateforme.
This commit is contained in:
Thomas Lavocat
2023-05-28 18:25:57 +02:00
parent 8ac8a90d8a
commit 84c8800b8a
2 changed files with 15 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=37 format=3 uid="uid://dv0mokf4eogm7"]
[gd_scene load_steps=43 format=3 uid="uid://dv0mokf4eogm7"]
[ext_resource type="Script" path="res://princesse.gd" id="1_dkp7s"]
[ext_resource type="Texture2D" uid="uid://dr7fyh2rufsyj" path="res://sprite/princess_falling_direction.png" id="2_hholp"]
@@ -308,11 +308,17 @@ drag_horizontal_enabled = true
drag_vertical_enabled = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, 3)
position = Vector2(0, 5)
shape = SubResource("CapsuleShape2D_6r7th")
[node name="ground_far_detect" type="RayCast2D" parent="."]
target_position = Vector2(0, 38)
position = Vector2(4, 0)
target_position = Vector2(0, 42)
collision_mask = 16
[node name="ground_far_detect2" type="RayCast2D" parent="."]
position = Vector2(-4, 0)
target_position = Vector2(0, 42)
collision_mask = 16
[node name="Death player" type="AnimationPlayer" parent="."]