root_scene.tscn 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. [gd_scene load_steps=12 format=3 uid="uid://bb2d2pg141px2"]
  2. [ext_resource type="Material" uid="uid://wmxpt4du7a7o" path="res://materials/textured_block_material.tres" id="1_aaj47"]
  3. [ext_resource type="Material" uid="uid://6xb8wymquafc" path="res://materials/tile_material.tres" id="1_puepx"]
  4. [ext_resource type="Script" path="res://player_controller.gd" id="1_sc6rc"]
  5. [ext_resource type="Material" uid="uid://ccvmfntb7w7un" path="res://materials/selection_material.tres" id="4_y6f8l"]
  6. [ext_resource type="Texture2D" uid="uid://o1xfqjo1nbsw" path="res://textures/crosshair.png" id="5_r8a1l"]
  7. [ext_resource type="Environment" uid="uid://bh13kcd0h21o6" path="res://env/world_env.tres" id="6_2njup"]
  8. [sub_resource type="BoxShape3D" id="BoxShape3D_mqvhu"]
  9. size = Vector3(0.65, 1.7, 0.65)
  10. [sub_resource type="CapsuleMesh" id="CapsuleMesh_hk3se"]
  11. radius = 0.3
  12. height = 1.7
  13. [sub_resource type="BoxShape3D" id="BoxShape3D_t1jtl"]
  14. [sub_resource type="BoxMesh" id="BoxMesh_fa4cx"]
  15. material = ExtResource("1_puepx")
  16. size = Vector3(10, 1, 10)
  17. [sub_resource type="BoxMesh" id="BoxMesh_yunsl"]
  18. material = ExtResource("4_y6f8l")
  19. size = Vector3(1.05, 1.05, 1.05)
  20. [node name="Root" type="Node"]
  21. [node name="CraftdigBridge" type="CraftdigBridge" parent="." node_paths=PackedStringArray("player", "camera", "selection", "lbl_coords", "lbl_blkty")]
  22. chunk_update_rate = 8
  23. init_world_script = "
  24. p 0 0 0
  25. filllayer s
  26. up
  27. filllayer s
  28. up
  29. filllayer d
  30. up
  31. filllayer g
  32. up
  33. # do a weird shape like this:
  34. # @
  35. # @@@@
  36. p 5 4 5
  37. setmx c
  38. setmx c
  39. setmx c
  40. setmx c
  41. p 6 5 5
  42. set g
  43. # and then another block next to it
  44. p 6 4 7
  45. set c
  46. write
  47. "
  48. player = NodePath("../CharacterBody3D")
  49. camera = NodePath("../CharacterBody3D/Camera3D")
  50. selection = NodePath("../Selection")
  51. block_mat = ExtResource("1_aaj47")
  52. lbl_coords = NodePath("../Coords")
  53. lbl_blkty = NodePath("../SelBlock")
  54. [node name="ChunksRoot" type="Node3D" parent="CraftdigBridge"]
  55. [node name="CharacterBody3D" type="CharacterBody3D" parent="."]
  56. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 20, 5, 1)
  57. script = ExtResource("1_sc6rc")
  58. jump_vel = 35.0
  59. [node name="Camera3D" type="Camera3D" parent="CharacterBody3D"]
  60. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.6, 0)
  61. fov = 85.0
  62. [node name="CollisionShape3D" type="CollisionShape3D" parent="CharacterBody3D"]
  63. shape = SubResource("BoxShape3D_mqvhu")
  64. [node name="MeshInstance3D" type="MeshInstance3D" parent="CharacterBody3D"]
  65. mesh = SubResource("CapsuleMesh_hk3se")
  66. skeleton = NodePath("")
  67. [node name="StaticBody3D" type="StaticBody3D" parent="."]
  68. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -12.7449, -1.90735e-06, 2.32059)
  69. [node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D"]
  70. transform = Transform3D(10, 0, 0, 0, 1, 0, 0, 0, 10, 0, 0, 0)
  71. shape = SubResource("BoxShape3D_t1jtl")
  72. [node name="MeshInstance3D" type="MeshInstance3D" parent="StaticBody3D"]
  73. material_override = ExtResource("1_puepx")
  74. mesh = SubResource("BoxMesh_fa4cx")
  75. [node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
  76. transform = Transform3D(0.516967, -0.525973, 0.67535, 0, 0.788955, 0.614451, -0.856005, -0.31765, 0.407864, 8.55806, 7.36706, 4.01961)
  77. [node name="Selection" type="Node3D" parent="."]
  78. [node name="SelectionBox" type="MeshInstance3D" parent="Selection"]
  79. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.5, 0.5, 0.5)
  80. mesh = SubResource("BoxMesh_yunsl")
  81. skeleton = NodePath("")
  82. metadata/_edit_lock_ = true
  83. [node name="SelBlock" type="Label" parent="."]
  84. offset_left = 12.0
  85. offset_top = 56.0
  86. offset_right = 136.0
  87. offset_bottom = 88.0
  88. text = "cobblestone"
  89. [node name="Coords" type="Label" parent="."]
  90. offset_left = 12.0
  91. offset_top = 12.0
  92. offset_right = 184.0
  93. offset_bottom = 44.0
  94. text = "X 123 / Y 3 / Z 789"
  95. [node name="TextureRect" type="TextureRect" parent="."]
  96. texture_filter = 1
  97. anchors_preset = 8
  98. anchor_left = 0.5
  99. anchor_top = 0.5
  100. anchor_right = 0.5
  101. anchor_bottom = 0.5
  102. offset_left = -64.0
  103. offset_top = -64.0
  104. offset_right = 64.0
  105. offset_bottom = 64.0
  106. grow_horizontal = 2
  107. grow_vertical = 2
  108. texture = ExtResource("5_r8a1l")
  109. [node name="WorldEnvironment" type="WorldEnvironment" parent="."]
  110. environment = ExtResource("6_2njup")