Basic pathfinding working for crying ghosts

This commit is contained in:
2026-01-17 23:37:33 -06:00
parent dd4ce5fcf4
commit 3a63bb6709
46 changed files with 691 additions and 34 deletions

View File

@@ -0,0 +1,38 @@
[gd_scene load_steps=5 format=3 uid="uid://61hp8l06y7ka"]
[ext_resource type="Script" uid="uid://d2mxshuj7um8x" path="res://Characters/Crying Ghost/CryingGhost.cs" id="1_wdx63"]
[ext_resource type="SpriteFrames" uid="uid://v2dncd7e66ki" path="res://Characters/Crying Ghost/Crying Ghost.tres" id="2_6ooq7"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_wdx63"]
radius = 4.0
height = 22.0
[sub_resource type="CircleShape2D" id="CircleShape2D_wdx63"]
radius = 128.0
[node name="CryingGhost" type="CharacterBody2D"]
script = ExtResource("1_wdx63")
Speed = 50.0
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = ExtResource("2_6ooq7")
animation = &"idle"
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CapsuleShape2D_wdx63")
[node name="NavigationAgent2D" type="NavigationAgent2D" parent="."]
path_desired_distance = 4.0
target_desired_distance = 4.0
path_postprocessing = 1
avoidance_enabled = true
radius = 4.0
debug_enabled = true
[node name="DetectionArea" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="DetectionArea"]
shape = SubResource("CircleShape2D_wdx63")
[node name="TargetTimer" type="Timer" parent="."]
wait_time = 0.25