summaryrefslogtreecommitdiff
path: root/Units/Default.tscn
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-10-03 12:51:49 +0200
committerDaniel Weipert <git@mail.dweipert.de>2024-10-03 12:51:49 +0200
commit5442988a8ccecb9c323fc98557391a15ff245b87 (patch)
tree1864a03602291e2c495a8846b80ec90414060f61 /Units/Default.tscn
parentc8bd14d6feeca72fc96b895c9382ebc16a1caf55 (diff)
next commit
Diffstat (limited to 'Units/Default.tscn')
-rw-r--r--Units/Default.tscn26
1 files changed, 19 insertions, 7 deletions
diff --git a/Units/Default.tscn b/Units/Default.tscn
index 1e33862..38bcc9c 100644
--- a/Units/Default.tscn
+++ b/Units/Default.tscn
@@ -4,12 +4,14 @@
[ext_resource type="PackedScene" uid="uid://bj8j72hwnt6mo" path="res://animated_sprite.tscn" id="2_5hewh"]
[ext_resource type="SpriteFrames" uid="uid://diwyagjvsgq0i" path="res://Units/units_sprite_frames.tres" id="2_y5w2o"]
-[sub_resource type="RectangleShape2D" id="RectangleShape2D_j6kqi"]
-size = Vector2(4, 9)
+[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_p461f"]
+radius = 2.0
+height = 9.0
[node name="Default" type="CharacterBody2D"]
collision_mask = 256
input_pickable = true
+safe_margin = 0.01
script = ExtResource("1_kguyl")
[node name="AnimatedSprite" parent="." instance=ExtResource("2_5hewh")]
@@ -21,15 +23,25 @@ offset = Vector2(-3, -5)
[node name="NavigationShape" type="CollisionShape2D" parent="."]
position = Vector2(0, 0.5)
-shape = SubResource("RectangleShape2D_j6kqi")
+shape = SubResource("CapsuleShape2D_p461f")
-[node name="RayLeft" type="RayCast2D" parent="."]
-position = Vector2(0, 4)
+[node name="RayWallLeft" type="RayCast2D" parent="."]
+position = Vector2(0, 3)
target_position = Vector2(-3, 0)
collision_mask = 258
-[node name="RayRight" type="RayCast2D" parent="."]
-position = Vector2(0, 4)
+[node name="RaySlopeLeft" type="RayCast2D" parent="."]
+position = Vector2(0, 5)
+target_position = Vector2(-3, 0)
+collision_mask = 258
+
+[node name="RayWallRight" type="RayCast2D" parent="."]
+position = Vector2(0, 3)
+target_position = Vector2(4, 0)
+collision_mask = 258
+
+[node name="RaySlopeRight" type="RayCast2D" parent="."]
+position = Vector2(0, 5)
target_position = Vector2(4, 0)
collision_mask = 258