Initial setup for NPCs and their pathfinding.
This commit is contained in:
parent
0fa362aed4
commit
1ca0a2bdc0
6 changed files with 204 additions and 7 deletions
24
scenes/entities/npc.tscn
Normal file
24
scenes/entities/npc.tscn
Normal file
|
@ -0,0 +1,24 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://cvnjpnvchvakj"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/entities/npc.gd" id="1_jvyx6"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_e5nrh"]
|
||||
albedo_color = Color(1, 0, 0, 1)
|
||||
|
||||
[sub_resource type="CapsuleMesh" id="CapsuleMesh_qcrlh"]
|
||||
material = SubResource("StandardMaterial3D_e5nrh")
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_am313"]
|
||||
|
||||
[node name="Npc" type="CharacterBody3D"]
|
||||
script = ExtResource("1_jvyx6")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
mesh = SubResource("CapsuleMesh_qcrlh")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("CapsuleShape3D_am313")
|
||||
|
||||
[node name="NavigationAgent3D" type="NavigationAgent3D" parent="."]
|
||||
avoidance_enabled = true
|
||||
height = 2.0
|
|
@ -17,3 +17,7 @@ shape = SubResource("CapsuleShape3D_7frjr")
|
|||
|
||||
[node name="Camera3D" type="Camera3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
offset_right = 40.0
|
||||
offset_bottom = 23.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue