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

BIN
Blends/.DS_Store vendored

Binary file not shown.

Binary file not shown.

Binary file not shown.

42
Blends/Person/Person.mtl Normal file
View File

@@ -0,0 +1,42 @@
# Blender 4.5.1 LTS MTL File: 'Person.blend'
# www.blender.org
newmtl pants
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Kd 0.078350 0.038007 0.007093
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.500000
d 1.000000
illum 2
newmtl shirt
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Kd 0.800251 0.040193 0.006973
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.500000
d 1.000000
illum 2
newmtl shoes
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Kd 0.800157 0.310205 0.008149
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.500000
d 1.000000
illum 2
newmtl skin
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Kd 0.537415 0.483044 0.372101
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2

264
Blends/Person/Person.obj Normal file
View File

@@ -0,0 +1,264 @@
# Blender 4.5.1 LTS
# www.blender.org
mtllib Person.mtl
o Cube
v 0.424157 1.000000 1.210602
v 0.424157 -1.000000 1.210602
v 0.424157 1.000000 1.817794
v 0.424157 -1.000000 1.817794
v -0.424157 1.000000 1.210602
v -0.424157 -1.000000 1.210602
v -0.424157 1.000000 1.817794
v -0.424157 -1.000000 1.817794
v 0.424157 1.681626 1.726821
v -0.424157 1.681626 1.726821
v 0.424157 1.681626 1.119629
v -0.424157 1.681626 1.119629
v 0.465350 1.869215 1.756305
v -0.465350 1.869215 1.756305
v 0.465350 1.869215 1.090145
v -0.465350 1.869215 1.090145
v 0.465350 3.960950 1.756305
v -0.465350 3.960950 1.756305
v 0.465350 3.960950 1.090145
v -0.465350 3.960950 1.090145
v -0.465350 1.869215 -0.616292
v 0.465350 1.869215 -0.616292
v -0.465350 3.960950 -0.616292
v 0.465350 3.960950 -0.616292
v 0.424157 1.000000 -0.616741
v 0.424157 -1.000000 -0.616741
v 0.424157 1.000000 -0.009549
v 0.424157 -1.000000 -0.009549
v -0.424157 1.000000 -0.616741
v -0.424157 -1.000000 -0.616741
v -0.424157 1.000000 -0.009549
v -0.424157 -1.000000 -0.009549
v 0.424157 1.681626 0.035579
v -0.424157 1.681626 0.035579
v 0.424157 1.681626 -0.571613
v -0.424157 1.681626 -0.571613
v 0.465350 1.869215 0.065064
v -0.465350 1.869215 0.065064
v 0.465350 1.869215 -0.601097
v -0.465350 1.869215 -0.601097
v 0.465350 4.412960 1.756305
v -0.465350 4.412960 1.756305
v 0.465350 4.412960 1.090145
v -0.465350 4.412960 1.090145
v -0.465350 4.412960 -0.616292
v 0.465350 4.412960 -0.616292
v 0.465350 3.960950 2.364755
v -0.465350 3.960950 2.364755
v 0.465350 4.412960 2.364755
v -0.465350 4.412960 2.364755
v -0.465350 3.960950 -1.224741
v 0.465350 3.960950 -1.224741
v -0.465350 4.412960 -1.224741
v 0.465350 4.412960 -1.224741
v 0.465350 3.960950 2.901933
v -0.465350 3.960950 2.901933
v 0.465350 4.412960 2.901933
v -0.465350 4.412960 2.901933
v -0.465350 3.960950 -1.761919
v 0.465350 3.960950 -1.761919
v -0.465350 4.412960 -1.761919
v 0.465350 4.412960 -1.761919
v 0.465350 2.122481 2.364755
v -0.465350 2.122481 2.364755
v -0.465350 2.122481 -1.224741
v 0.465350 2.122481 -1.224741
v 0.465350 2.122481 2.901933
v -0.465350 2.122481 2.901933
v -0.465350 2.122481 -1.761919
v 0.465350 2.122481 -1.761919
v 0.341118 4.412960 0.997572
v 0.341118 4.412960 0.963028
v -0.341118 4.412960 0.963028
v -0.341118 4.412960 0.997572
v -0.341118 4.412960 0.228423
v 0.341118 4.412960 0.228423
v 0.246096 4.839692 0.926766
v 0.246096 4.839692 1.031785
v -0.246096 4.839692 1.031785
v -0.246096 4.839692 0.926766
v -0.246096 4.839692 0.230472
v 0.246096 4.839692 0.230472
v 0.333577 4.731478 0.972304
v 0.333577 4.731478 1.449828
v -0.333577 4.731478 1.449828
v -0.333577 4.731478 0.972304
v -0.333577 4.731478 -0.250921
v 0.333577 4.731478 -0.250921
v -0.424157 -1.000000 1.210602
v -0.424157 -1.000000 1.817794
v 0.424157 -1.000000 1.210602
v 0.424157 -1.000000 1.817794
v -0.424157 -1.358322 -0.616741
v -0.424157 -1.358322 -0.009549
v 0.424157 -1.358322 -0.616741
v 0.424157 -1.358322 -0.009549
v -0.424157 -1.358322 1.210602
v -0.424157 -1.358322 1.817794
v 0.424157 -1.358322 1.210602
v 0.424157 -1.358322 1.817794
v 0.886680 -1.000000 -0.009549
v 0.886680 -1.000000 -0.616741
v 0.886680 -1.000000 1.817794
v 0.886680 -1.000000 1.210602
v 0.886680 -1.358322 -0.009549
v 0.886680 -1.358322 -0.616741
v 0.886680 -1.358322 1.817794
v 0.886680 -1.358322 1.210602
v 0.333577 5.909863 0.972304
v 0.333577 5.909863 1.449828
v -0.333577 5.909863 1.449828
v -0.333577 5.909863 0.972304
v -0.333577 5.909863 -0.250921
v 0.333577 5.909863 -0.250921
vn -1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 1.0000
vn -0.0000 1.0000 -0.0000
vn 1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 -1.0000
vn -0.9767 -0.2145 -0.0000
vn -0.0000 -0.1323 -0.9912
vn -0.0000 0.1323 0.9912
vn -0.0000 -0.1553 0.9879
vn -0.0000 -0.1553 -0.9879
vn 0.9767 -0.2145 -0.0000
vn -0.0000 -1.0000 -0.0000
vn -0.0000 0.0661 -0.9978
vn -0.0000 -0.0661 0.9978
vn 0.9761 0.2174 -0.0000
vn 0.7777 -0.6287 -0.0000
vn -0.0000 0.0048 -1.0000
vn -0.0000 -0.1591 0.9873
vn -0.9761 0.2174 -0.0000
vn -0.0000 -0.9757 0.2193
vn -0.0000 -0.9681 -0.2506
vn -0.7777 -0.6287 -0.0000
vt 0.625000 0.250000
vt 0.625000 0.000000
vt 0.375000 0.750000
vt 0.625000 0.750000
vt 0.625000 1.000000
vt 0.375000 1.000000
vt 0.375000 0.000000
vt 0.375000 0.250000
vt 0.375000 0.500000
vt 0.625000 0.500000
vt 0.875000 0.500000
vt 0.875000 0.750000
vt 0.125000 0.500000
vt 0.125000 0.750000
s 0
usemtl skin
f 8/7/3 6/8/3 89/8/3 90/7/3
f 56/2/1 48/2/1 64/2/1 68/2/1
f 51/1/1 59/1/1 69/1/1 65/1/1
f 66/10/12 65/1/12 69/1/12 70/10/12
f 64/5/12 63/4/12 67/4/12 68/5/12
f 52/10/2 51/1/2 65/1/2 66/10/2
f 48/5/5 47/4/5 63/4/5 64/5/5
f 59/1/5 60/10/5 70/10/5 69/1/5
f 60/10/4 52/10/4 66/10/4 70/10/4
f 55/4/2 56/5/2 68/5/2 67/4/2
f 47/4/4 55/4/4 67/4/4 63/4/4
f 72/4/15 71/10/15 77/10/15 78/4/15
f 81/1/16 80/1/16 86/1/16 87/1/16
f 71/10/15 76/10/15 82/10/15 77/10/15
f 76/10/17 75/11/17 81/11/17 82/10/17
f 73/12/18 72/4/18 78/4/18 79/12/18
f 75/1/19 74/1/19 80/1/19 81/1/19
f 74/1/19 73/2/19 79/2/19 80/1/19
f 84/4/4 83/10/4 109/10/4 110/4/4
f 80/1/16 79/2/16 85/2/16 86/1/16
f 82/10/20 81/11/20 87/11/20 88/10/20
f 79/12/21 78/4/21 84/4/21 85/12/21
f 78/4/22 77/10/22 82/10/22 88/10/22 83/10/22 84/4/22
f 2/9/3 4/3/3 92/3/3 91/9/3
f 6/8/3 2/9/3 91/9/3 89/8/3
f 4/3/3 8/6/3 90/6/3 92/3/3
f 112/11/3 111/12/3 110/4/3 109/10/3 114/10/3 113/11/3
f 83/10/4 88/10/4 114/10/4 109/10/4
f 88/10/5 87/11/5 113/11/5 114/10/5
f 85/12/2 84/4/2 110/4/2 111/12/2
f 87/1/1 86/1/1 112/1/1 113/1/1
f 86/1/1 85/2/1 111/2/1 112/1/1
usemtl shirt
f 43/10/3 46/10/3 76/10/3 71/10/3
f 16/1/1 14/2/1 18/2/1 20/1/1 23/1/1 21/1/1
f 14/5/2 13/4/2 17/4/2 18/5/2
f 45/11/3 46/10/3 54/10/3 53/11/3
f 20/1/1 18/2/1 42/2/1 44/1/1
f 22/10/5 21/1/5 23/1/5 24/10/5
f 18/5/12 17/4/12 47/4/12 48/5/12
f 19/10/4 24/10/4 46/10/4 43/10/4
f 13/4/4 15/10/4 22/10/4 24/10/4 19/10/4 17/4/4
f 23/1/1 20/1/1 44/1/1 45/1/1
f 17/4/4 19/10/4 43/10/4 41/4/4
f 50/2/1 48/2/1 56/2/1 58/2/1
f 24/10/12 23/1/12 51/1/12 52/10/12
f 46/10/4 24/10/4 52/10/4 54/10/4
f 17/4/4 41/4/4 49/4/4 47/4/4
f 41/4/3 42/12/3 50/12/3 49/4/3
f 42/2/1 18/2/1 48/2/1 50/2/1
f 23/1/1 45/1/1 53/1/1 51/1/1
f 56/5/2 55/4/2 57/4/2 58/5/2
f 60/10/5 59/1/5 61/1/5 62/10/5
f 54/10/4 52/10/4 60/10/4 62/10/4
f 47/4/4 49/4/4 57/4/4 55/4/4
f 53/11/3 54/10/3 62/10/3 61/11/3
f 49/4/3 50/12/3 58/12/3 57/4/3
f 51/1/1 53/1/1 61/1/1 59/1/1
f 46/10/3 45/11/3 75/11/3 76/10/3
f 44/1/3 42/2/3 73/2/3 74/1/3
f 42/12/3 41/4/3 72/4/3 73/12/3
f 41/4/3 43/10/3 71/10/3 72/4/3
f 45/1/3 44/1/3 74/1/3 75/1/3
usemtl shoes
f 89/8/5 91/9/5 99/9/5 97/8/5
f 26/9/3 28/3/3 101/3/3 102/9/3
f 93/13/12 95/9/12 96/3/12 94/14/12
f 97/13/12 99/9/12 100/3/12 98/14/12
f 32/7/1 30/8/1 93/8/1 94/7/1
f 91/9/3 92/3/3 103/3/3 104/9/3
f 92/3/2 90/6/2 98/6/2 100/3/2
f 30/8/5 26/9/5 95/9/5 93/8/5
f 90/7/1 89/8/1 97/8/1 98/7/1
f 28/3/2 32/6/2 94/6/2 96/3/2
f 104/9/4 103/3/4 107/3/4 108/9/4
f 102/9/4 101/3/4 105/3/4 106/9/4
f 28/3/2 96/3/2 105/3/2 101/3/2
f 99/9/5 91/9/5 104/9/5 108/9/5
f 100/3/12 99/9/12 108/9/12 107/3/12
f 95/9/5 26/9/5 102/9/5 106/9/5
f 96/3/12 95/9/12 106/9/12 105/3/12
f 92/3/2 100/3/2 107/3/2 103/3/2
usemtl pants
f 5/1/1 7/2/1 10/2/1 12/1/1
f 4/3/2 3/4/2 7/5/2 8/6/2
f 8/7/1 7/2/1 5/1/1 6/8/1
f 2/9/4 1/10/4 3/4/4 4/3/4
f 6/8/5 5/1/5 1/10/5 2/9/5
f 12/1/6 10/2/6 14/2/6 16/1/6
f 3/4/4 1/10/4 11/10/4 9/4/4
f 1/10/7 5/1/7 12/1/7 11/10/7
f 7/5/8 3/4/8 9/4/8 10/5/8
f 10/5/9 9/4/9 13/4/9 14/5/9
f 11/10/10 12/1/10 16/1/10 15/10/10
f 9/4/11 11/10/11 15/10/11 13/4/11
f 15/10/12 16/1/12 21/1/12 22/10/12
f 29/1/1 31/2/1 34/2/1 36/1/1
f 28/3/2 27/4/2 31/5/2 32/6/2
f 32/7/1 31/2/1 29/1/1 30/8/1
f 26/9/4 25/10/4 27/4/4 28/3/4
f 30/8/5 29/1/5 25/10/5 26/9/5
f 36/1/6 34/2/6 38/2/6 40/1/6
f 27/4/4 25/10/4 35/10/4 33/4/4
f 25/10/13 29/1/13 36/1/13 35/10/13
f 31/5/14 27/4/14 33/4/14 34/5/14
f 34/5/9 33/4/9 37/4/9 38/5/9
f 35/10/10 36/1/10 40/1/10 39/10/10
f 33/4/11 35/10/11 39/10/11 37/4/11

View File

@@ -0,0 +1,25 @@
[remap]
importer="wavefront_obj"
importer_version=1
type="Mesh"
uid="uid://dwd6ylq5xn6kj"
path="res://.godot/imported/Person.obj-dc9b17fda3b223cded37128b643acb4a.mesh"
[deps]
files=["res://.godot/imported/Person.obj-dc9b17fda3b223cded37128b643acb4a.mesh"]
source_file="res://Blends/Person/Person.obj"
dest_files=["res://.godot/imported/Person.obj-dc9b17fda3b223cded37128b643acb4a.mesh", "res://.godot/imported/Person.obj-dc9b17fda3b223cded37128b643acb4a.mesh"]
[params]
generate_tangents=true
generate_lods=true
generate_shadow_mesh=true
generate_lightmap_uv2=false
generate_lightmap_uv2_texel_size=0.2
scale_mesh=Vector3(1, 1, 1)
offset_mesh=Vector3(0, 0, 0)
force_disable_mesh_compression=false

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")] [node name="Person" type="CharacterBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.600845) 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

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=13 format=3 uid="uid://dim2geqhn6d35"] [gd_scene load_steps=14 format=3 uid="uid://dim2geqhn6d35"]
[ext_resource type="Script" uid="uid://dhls6unflalvd" path="res://Scripts/cart.gd" id="1_esjgi"] [ext_resource type="Script" uid="uid://dhls6unflalvd" path="res://Scripts/cart.gd" id="1_esjgi"]
[ext_resource type="ArrayMesh" uid="uid://p3d7iitismhf" path="res://Blends/Cart/cart-bottom.obj" id="1_ux2tx"] [ext_resource type="ArrayMesh" uid="uid://p3d7iitismhf" path="res://Blends/Cart/cart-bottom.obj" id="1_ux2tx"]
@@ -8,11 +8,14 @@
[ext_resource type="Shader" uid="uid://bfv6ckihralab" path="res://Shaders/build_transparent.gdshader" id="6_ru0md"] [ext_resource type="Shader" uid="uid://bfv6ckihralab" path="res://Shaders/build_transparent.gdshader" id="6_ru0md"]
[sub_resource type="NavigationMesh" id="NavigationMesh_ru0md"] [sub_resource type="NavigationMesh" id="NavigationMesh_ru0md"]
vertices = PackedVector3Array(-10.1323, -0.408406, -1.99609, -10.1323, -0.408406, 3.25391, 10.8677, -0.408406, 3.25391, 10.8677, -0.408406, -1.99609) vertices = PackedVector3Array(-8.66035, 3.12619, -1.92166, -8.66035, 3.12619, -0.421665, -2.91035, 3.12619, -0.421665, -2.91035, 3.12619, -1.92166, -2.16035, -0.12381, 0.578335, -9.66035, -0.12381, 0.328335, -9.66035, -0.12381, 2.82834, 11.5896, -0.12381, 2.82834, 11.5896, -0.12381, -1.92166, -1.91035, -0.12381, -1.92166, -8.41035, -0.12381, -1.67166, -8.41035, -0.12381, -0.671665, -3.16035, -0.12381, -0.671665, -3.16035, -0.12381, -1.67166)
polygons = [PackedInt32Array(3, 2, 0), PackedInt32Array(0, 2, 1)] polygons = [PackedInt32Array(3, 2, 0), PackedInt32Array(0, 2, 1), PackedInt32Array(5, 4, 6), PackedInt32Array(6, 4, 7), PackedInt32Array(9, 8, 4), PackedInt32Array(4, 8, 7), PackedInt32Array(13, 12, 10), PackedInt32Array(10, 12, 11)]
[sub_resource type="BoxShape3D" id="BoxShape3D_ru0md"] [sub_resource type="BoxShape3D" id="BoxShape3D_ru0md"]
size = Vector3(22.012, 1.44263, 6.17651) size = Vector3(6.47229, 3.39474, 2.33685)
[sub_resource type="BoxShape3D" id="BoxShape3D_u7bw1"]
size = Vector3(22.1814, 0.0957031, 5.72699)
[sub_resource type="BoxShape3D" id="BoxShape3D_esjgi"] [sub_resource type="BoxShape3D" id="BoxShape3D_esjgi"]
size = Vector3(22.2341, 4.23804, 0.494629) size = Vector3(22.2341, 4.23804, 0.494629)
@@ -36,18 +39,25 @@ cartTop = NodePath("Cart-top")
mesh = ExtResource("1_ux2tx") mesh = ExtResource("1_ux2tx")
[node name="NavigationRegion3D" type="NavigationRegion3D" parent="Cart-bottom"] [node name="NavigationRegion3D" type="NavigationRegion3D" parent="Cart-bottom"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.195475, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.55366, 0)
navigation_mesh = SubResource("NavigationMesh_ru0md") navigation_mesh = SubResource("NavigationMesh_ru0md")
[node name="NavigationObstacle3D" type="NavigationObstacle3D" parent="Cart-bottom/NavigationRegion3D"] [node name="NavigationObstacle3D" type="NavigationObstacle3D" parent="Cart-bottom/NavigationRegion3D"]
vertices = PackedVector3Array(-3.06239, 0, -0.0118253, -8.33663, 0, 0.206487, -8.58355, 0, -2.00176, -2.85335, 0, -2.40343) affect_navigation_mesh = true
carve_navigation_mesh = true
[node name="StaticBody3D" type="StaticBody3D" parent="Cart-bottom/NavigationRegion3D/NavigationObstacle3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.50052, -0.0203562, -1.1511)
[node name="CollisionShape3D" type="CollisionShape3D" parent="Cart-bottom/NavigationRegion3D/NavigationObstacle3D/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.352722, 1.07356, -0.102142)
shape = SubResource("BoxShape3D_ru0md")
[node name="StaticBody3D" type="StaticBody3D" parent="Cart-bottom/NavigationRegion3D"] [node name="StaticBody3D" type="StaticBody3D" parent="Cart-bottom/NavigationRegion3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.486526, 0)
[node name="CollisionShape3D" type="CollisionShape3D" parent="Cart-bottom/NavigationRegion3D/StaticBody3D"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Cart-bottom/NavigationRegion3D/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.373695, -0.950567, 0.592163) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.930367, -0.452148, 0.568024)
shape = SubResource("BoxShape3D_ru0md") shape = SubResource("BoxShape3D_u7bw1")
[node name="Wheels2" type="MeshInstance3D" parent="."] [node name="Wheels2" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 3.49691e-07, 0, -3.49691e-07, 1, 0, 0, 0, 1, -6.05656, -1.694, -2.014) transform = Transform3D(1, 3.49691e-07, 0, -3.49691e-07, 1, 0, 0, 0, 1, -6.05656, -1.694, -2.014)

View File

@@ -1,6 +1,7 @@
[gd_scene load_steps=11 format=3 uid="uid://bj7y7q2qkpnci"] [gd_scene load_steps=12 format=3 uid="uid://bj7y7q2qkpnci"]
[ext_resource type="ArrayMesh" uid="uid://622ethh2pdfa" path="res://Blends/road/road.obj" id="4_jjvhh"] [ext_resource type="ArrayMesh" uid="uid://622ethh2pdfa" path="res://Blends/road/road.obj" id="4_jjvhh"]
[ext_resource type="PackedScene" uid="uid://dqrqq5vg8hek3" path="res://Scenes/Prefabs/Person.tscn" id="5_kry3j"]
[ext_resource type="PackedScene" uid="uid://dim2geqhn6d35" path="res://Scenes/Prefabs/cart.tscn" id="6_21xkr"] [ext_resource type="PackedScene" uid="uid://dim2geqhn6d35" path="res://Scenes/Prefabs/cart.tscn" id="6_21xkr"]
[ext_resource type="PackedScene" uid="uid://dy03tqug33fep" path="res://Blends/ground.blend" id="6_344ge"] [ext_resource type="PackedScene" uid="uid://dy03tqug33fep" path="res://Blends/ground.blend" id="6_344ge"]
[ext_resource type="Script" uid="uid://drrp1k2q71hq2" path="res://Scripts/camera_3d.gd" id="7_6bp64"] [ext_resource type="Script" uid="uid://drrp1k2q71hq2" path="res://Scripts/camera_3d.gd" id="7_6bp64"]
@@ -65,7 +66,7 @@ process_material = SubResource("ParticleProcessMaterial_21xkr")
draw_pass_1 = SubResource("QuadMesh_21xkr") draw_pass_1 = SubResource("QuadMesh_21xkr")
[node name="SpotLight3D" type="SpotLight3D" parent="."] [node name="SpotLight3D" type="SpotLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.64431, 0.764764, 0, -0.764764, 0.64431, -15.9548, 6.86886, -60.5361) transform = Transform3D(1, 0, 0, 0, 0.64431, 0.764764, 0, -0.764764, 0.64431, -14.3055, 3.48611, -59.8356)
light_energy = 1.162 light_energy = 1.162
spot_range = 23.417 spot_range = 23.417
spot_angle = 89.99 spot_angle = 89.99
@@ -111,3 +112,6 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 20.321, 0.384693, -59.426)
[node name="ground2" parent="." instance=ExtResource("6_344ge")] [node name="ground2" parent="." instance=ExtResource("6_344ge")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 180.354, 0.385, -59.426) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 180.354, 0.385, -59.426)
[node name="Person" parent="." instance=ExtResource("5_kry3j")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.335692, 3.74189, -60.6947)

18
Scripts/person.gd Normal file
View File

@@ -0,0 +1,18 @@
extends CharacterBody3D
var nav_agent: NavigationAgent3D
func _ready() -> void:
nav_agent = $NavigationAgent3D
Global.object_placed.connect(_on_object_placed)
#nav_agent.target_position = Vector3(-15.955,3.486,-58.942)
func _physics_process(delta: float) -> void:
var new_velocity = global_position.direction_to(nav_agent.get_next_path_position()) * 5.0
velocity = new_velocity
move_and_slide()
func _on_object_placed():
nav_agent.target_position = Vector3(-14.305,3.486,-59.836)

1
Scripts/person.gd.uid Normal file
View File

@@ -0,0 +1 @@
uid://d308e5vxshc06