person added start position

This commit is contained in:
Nikolai Fesenko
2025-08-15 15:26:47 +02:00
parent b7bf4792f3
commit 7da59523a7
6 changed files with 56 additions and 7 deletions

View File

@@ -1,22 +1,31 @@
[gd_scene load_steps=4 format=3 uid="uid://dqrqq5vg8hek3"]
[gd_scene load_steps=6 format=3 uid="uid://dqrqq5vg8hek3"]
[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"]
[ext_resource type="Shader" uid="uid://bm15rdsdxldwl" path="res://Shaders/shirt.gdshader" id="3_dbviw"]
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_dh77o"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_kmh38"]
render_priority = 0
shader = ExtResource("3_dbviw")
shader_parameter/shirt_color = Vector3(0, 0, 0)
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_dbviw"]
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" type="CharacterBody3D"]
script = ExtResource("1_dh77o")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(0.3, 0, 0, 0, 0.3, 0, 0, 0, 0.3, 0, 0, 0)
transform = Transform3D(-1.31134e-08, 0, 0.3, 0, 0.3, 0, -0.3, 0, -1.31134e-08, 0, 0, 0.368102)
mesh = ExtResource("1_11yxf")
surface_material_override/1 = SubResource("ShaderMaterial_kmh38")
[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")
transform = Transform3D(-1.31134e-08, 0, 0.3, 0, 0.3, 0, -0.3, 0, -1.31134e-08, 0, 0, 0.368102)
shape = SubResource("ConvexPolygonShape3D_dbviw")
[node name="NavigationAgent3D" type="NavigationAgent3D" parent="."]
avoidance_enabled = true
debug_enabled = true
[connection signal="navigation_finished" from="NavigationAgent3D" to="." method="_on_navigation_agent_3d_navigation_finished"]

View File

@@ -39,7 +39,7 @@ cartTop = NodePath("Cart-top")
mesh = ExtResource("1_ux2tx")
[node name="NavigationRegion3D" type="NavigationRegion3D" parent="Cart-bottom"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.55366, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.138559, 0)
navigation_mesh = SubResource("NavigationMesh_ru0md")
[node name="NavigationObstacle3D" type="NavigationObstacle3D" parent="Cart-bottom/NavigationRegion3D"]