navigation agent added for person

now it goes to new object when it is placed . Also new obj model for person
This commit is contained in:
Nikolai Fesenko
2025-08-15 14:50:15 +02:00
parent 37960fe7f9
commit b7bf4792f3
11 changed files with 393 additions and 17 deletions

View File

@@ -1,10 +1,22 @@
[gd_scene load_steps=2 format=3 uid="uid://ciejie1wil58m"]
[gd_scene load_steps=4 format=3 uid="uid://dqrqq5vg8hek3"]
[ext_resource type="PackedScene" uid="uid://q3xjqni131pt" path="res://Blends/Person/Person.blend" id="1_11yxf"]
[ext_resource type="ArrayMesh" uid="uid://dwd6ylq5xn6kj" path="res://Blends/Person/Person.obj" id="1_11yxf"]
[ext_resource type="Script" uid="uid://d308e5vxshc06" path="res://Scripts/person.gd" id="1_dh77o"]
[node name="Person" type="Node3D"]
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_dh77o"]
points = PackedVector3Array(0.465296, 4.41226, 2.90193, 0.333481, 5.90986, 1.44973, -0.46535, 4.41226, 2.90193, 0.465296, 2.1221, 2.90193, 0.88668, -1.00046, 1.81769, 0.465296, 4.41226, -1.76192, 0.333481, 5.90986, -0.25128, -0.333667, 5.90986, 1.44973, -0.46535, 4.41226, -1.76192, -0.46535, 2.1221, 2.90193, 0.88668, -1.35832, 1.81769, 0.88668, -1.00046, -0.616956, 0.465296, 2.1221, -1.76192, -0.333667, 5.90986, -0.25128, -0.46535, 2.1221, -1.76192, -0.46535, 1.86882, 1.75606, -0.424191, -1.35832, 1.81769, 0.88668, -1.35832, -0.616956, -0.424191, -1.35832, -0.616956, -0.46535, 1.86882, -0.6165)
[node name="Person" parent="." instance=ExtResource("1_11yxf")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.600845)
[node name="Person" type="CharacterBody3D"]
script = ExtResource("1_dh77o")
[node name="NavigationAgent3D" type="NavigationAgent3D" parent="Person"]
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(0.3, 0, 0, 0, 0.3, 0, 0, 0, 0.3, 0, 0, 0)
mesh = ExtResource("1_11yxf")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(0.3, 0, 0, 0, 0.3, 0, 0, 0, 0.3, 0, 0, 0)
shape = SubResource("ConvexPolygonShape3D_dh77o")
[node name="NavigationAgent3D" type="NavigationAgent3D" parent="."]
avoidance_enabled = true
debug_enabled = true