Started terrain editor

This commit is contained in:
2025-01-02 04:16:30 +03:00
parent c3720f69c8
commit 6622e1a6ac
13 changed files with 765 additions and 160 deletions

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=15 format=2]
[gd_scene load_steps=16 format=2]
[ext_resource path="res://terrain/terrain_draw.png" type="Image" id=2]
[ext_resource path="res://terrain/terrain.png" type="Image" id=3]
@@ -44,7 +44,11 @@ extents = Vector3( 50, 1, 50 )
size = Vector3( 4, 4, 120 )
[sub_resource type="CubeMesh" id=14]
size = Vector3( 3, 60, 3 )
size = Vector3( 1.5, 60, 1.5 )
[sub_resource type="TorusMesh" id=15]
inner_radius = 5.5
outer_radius = 7.0
[node name="editor" type="Spatial"]
@@ -67,10 +71,17 @@ focus_mode = 2
unique_name_in_owner = true
margin_top = 52.0
margin_right = 248.0
margin_bottom = 524.0
margin_bottom = 128.0
[node name="v_terrain" type="VBoxContainer" parent="VBoxContainer"]
unique_name_in_owner = true
margin_top = 132.0
margin_right = 248.0
margin_bottom = 132.0
[node name="v_buildings" type="VBoxContainer" parent="VBoxContainer"]
unique_name_in_owner = true
visible = false
margin_top = 528.0
margin_right = 248.0
margin_bottom = 528.0
@@ -520,3 +531,25 @@ shape = SubResource( 12 )
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 30, 0 )
mesh = SubResource( 14 )
material/0 = SubResource( 11 )
[node name="terrain_cursor" type="Spatial" parent="."]
unique_name_in_owner = true
[node name="Area" type="Area" parent="terrain_cursor"]
collision_layer = 32768
collision_mask = 32768
monitoring = false
[node name="CollisionShape" type="CollisionShape" parent="terrain_cursor/Area"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2, 0 )
shape = SubResource( 12 )
[node name="mi" type="MeshInstance" parent="terrain_cursor"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 30, 0 )
mesh = SubResource( 14 )
material/0 = SubResource( 11 )
[node name="mi2" type="MeshInstance" parent="terrain_cursor"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 30, 0 )
mesh = SubResource( 15 )
material/0 = SubResource( 11 )