navmesh_chhunks_demo_3d.tscn 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. [gd_scene load_steps=11 format=3 uid="uid://cir4dtbp7i1ky"]
  2. [ext_resource type="Script" path="res://navmesh_chhunks_demo_3d.gd" id="1_027f2"]
  3. [sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_p73ky"]
  4. sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
  5. ground_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
  6. [sub_resource type="Sky" id="Sky_k64yg"]
  7. sky_material = SubResource("ProceduralSkyMaterial_p73ky")
  8. [sub_resource type="Environment" id="Environment_ccmns"]
  9. background_mode = 2
  10. sky = SubResource("Sky_k64yg")
  11. tonemap_mode = 2
  12. glow_enabled = true
  13. [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_8p3iq"]
  14. albedo_color = Color(0.2, 0.2, 0.2, 1)
  15. [sub_resource type="BoxMesh" id="BoxMesh_yn2x6"]
  16. size = Vector3(15, 1, 15)
  17. [sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_7rw3x"]
  18. points = PackedVector3Array(-7.5, -0.5, -7.5, -7.5, 0.5, -7.5, 7.5, -0.5, -7.5, -7.5, -0.5, 7.5, -7.5, 0.5, 7.5, 7.5, 0.5, -7.5, 7.5, -0.5, 7.5, 7.5, 0.5, 7.5)
  19. [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_3kxje"]
  20. albedo_color = Color(0.5, 0, 0, 1)
  21. [sub_resource type="BoxMesh" id="BoxMesh_hdqb8"]
  22. size = Vector3(5, 4, 5)
  23. [sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_ydj0h"]
  24. points = PackedVector3Array(-2.5, -2, -2.5, -2.5, 2, -2.5, 2.5, -2, -2.5, -2.5, -2, 2.5, -2.5, 2, 2.5, 2.5, 2, -2.5, 2.5, -2, 2.5, 2.5, 2, 2.5)
  25. [node name="NavMeshChunksDemo3D" type="Node3D"]
  26. script = ExtResource("1_027f2")
  27. [node name="Camera3D" type="Camera3D" parent="."]
  28. transform = Transform3D(0.707107, -0.5, 0.5, 0, 0.707107, 0.707107, -0.707107, -0.5, 0.5, 15, 18, 15)
  29. current = true
  30. fov = 40.0
  31. [node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
  32. transform = Transform3D(-0.866024, -0.433016, 0.250001, 0, 0.499998, 0.866026, -0.500003, 0.749999, -0.43301, 0, 0, 0)
  33. shadow_enabled = true
  34. [node name="WorldEnvironment" type="WorldEnvironment" parent="."]
  35. environment = SubResource("Environment_ccmns")
  36. [node name="ParseRootNode" type="Node3D" parent="."]
  37. unique_name_in_owner = true
  38. [node name="Ground" type="MeshInstance3D" parent="ParseRootNode"]
  39. material_override = SubResource("StandardMaterial3D_8p3iq")
  40. mesh = SubResource("BoxMesh_yn2x6")
  41. [node name="StaticBody3D" type="StaticBody3D" parent="ParseRootNode/Ground"]
  42. [node name="CollisionShape3D" type="CollisionShape3D" parent="ParseRootNode/Ground/StaticBody3D"]
  43. shape = SubResource("ConvexPolygonShape3D_7rw3x")
  44. [node name="CenterBlock" type="MeshInstance3D" parent="ParseRootNode"]
  45. material_override = SubResource("StandardMaterial3D_3kxje")
  46. mesh = SubResource("BoxMesh_hdqb8")
  47. [node name="NavmeshDiscard" type="NavigationObstacle3D" parent="ParseRootNode/CenterBlock"]
  48. height = 3.0
  49. vertices = PackedVector3Array(-2.5, 0, -2.5, 2.5, 0, -2.5, 2.5, 0, 2.5, -2.5, 0, 2.5)
  50. affect_navigation_mesh = true
  51. avoidance_enabled = false
  52. [node name="StaticBody3D" type="StaticBody3D" parent="ParseRootNode/CenterBlock"]
  53. [node name="CollisionShape3D" type="CollisionShape3D" parent="ParseRootNode/CenterBlock/StaticBody3D"]
  54. shape = SubResource("ConvexPolygonShape3D_ydj0h")
  55. [node name="DebugPaths" type="Node3D" parent="."]
  56. unique_name_in_owner = true
  57. [node name="PathDebugCorridorFunnel" type="NavigationAgent3D" parent="DebugPaths"]
  58. unique_name_in_owner = true
  59. debug_enabled = true
  60. debug_use_custom = true
  61. debug_path_custom_color = Color(1, 0, 1, 1)
  62. debug_path_custom_point_size = 10.0
  63. [node name="PathDebugEdgeCentered" type="NavigationAgent3D" parent="DebugPaths"]
  64. unique_name_in_owner = true
  65. path_postprocessing = 1
  66. debug_enabled = true
  67. debug_use_custom = true
  68. debug_path_custom_color = Color(1, 1, 0, 1)
  69. debug_path_custom_point_size = 10.0
  70. [node name="DebugMousePos" type="Node3D" parent="DebugPaths"]
  71. unique_name_in_owner = true
  72. [node name="ChunksContainer" type="Node3D" parent="."]
  73. unique_name_in_owner = true
  74. [node name="CanvasLayer" type="CanvasLayer" parent="."]
  75. [node name="PanelContainer" type="PanelContainer" parent="CanvasLayer"]
  76. offset_right = 40.0
  77. offset_bottom = 40.0
  78. [node name="MarginContainer" type="MarginContainer" parent="CanvasLayer/PanelContainer"]
  79. layout_mode = 2
  80. theme_override_constants/margin_left = 15
  81. theme_override_constants/margin_top = 15
  82. theme_override_constants/margin_right = 15
  83. theme_override_constants/margin_bottom = 15
  84. [node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/PanelContainer/MarginContainer"]
  85. layout_mode = 2
  86. [node name="Label" type="Label" parent="CanvasLayer/PanelContainer/MarginContainer/VBoxContainer"]
  87. layout_mode = 2
  88. text = "Use cursor button to set path start position"
  89. [node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer/PanelContainer/MarginContainer/VBoxContainer"]
  90. layout_mode = 2
  91. theme_override_constants/separation = 10
  92. [node name="ColorRect" type="ColorRect" parent="CanvasLayer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer"]
  93. custom_minimum_size = Vector2(128, 8)
  94. layout_mode = 2
  95. size_flags_vertical = 4
  96. color = Color(1, 0, 1, 1)
  97. [node name="Label" type="Label" parent="CanvasLayer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer"]
  98. layout_mode = 2
  99. text = "Path corridor-funnel"
  100. horizontal_alignment = 1
  101. vertical_alignment = 1
  102. [node name="HBoxContainer2" type="HBoxContainer" parent="CanvasLayer/PanelContainer/MarginContainer/VBoxContainer"]
  103. layout_mode = 2
  104. theme_override_constants/separation = 10
  105. [node name="ColorRect" type="ColorRect" parent="CanvasLayer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer2"]
  106. custom_minimum_size = Vector2(128, 8)
  107. layout_mode = 2
  108. size_flags_vertical = 4
  109. color = Color(1, 1, 0, 1)
  110. [node name="Label" type="Label" parent="CanvasLayer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer2"]
  111. layout_mode = 2
  112. text = "Path edge-centered"
  113. horizontal_alignment = 1
  114. vertical_alignment = 1