Skip to content

Commit 11567d3

Browse files
committed
Add script cache to demo project, and docs
1 parent 508af11 commit 11567d3

7 files changed

+46
-3
lines changed

.gitignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ _patches/
1313
# Docs
1414
doc/_build
1515

16-
# Godot-specific ignores
16+
# Godot-specific ignores (Include script cache. See godot issue #75388)
1717
/project/.import/
18-
/project/.godot/
18+
/project/.godot/*
19+
!/project/.godot/global_script_class_cache.cfg
1920
export.cfg
2021
export_presets.cfg
2122

Terrain3D.vcxproj

+1
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@
180180
<None Include="doc\conf.py" />
181181
<None Include="doc\docs\double_precision.md" />
182182
<None Include="doc\docs\games.md" />
183+
<None Include="doc\docs\misc.md" />
183184
<None Include="doc\docs\mobile_web.md" />
184185
<None Include="doc\docs\nightly_builds.md" />
185186
<None Include="doc\docs\press.md" />

Terrain3D.vcxproj.filters

+3
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@
190190
<None Include="doc\docs\storage_format.md">
191191
<Filter>2. Docs</Filter>
192192
</None>
193+
<None Include="doc\docs\misc.md">
194+
<Filter>2. Docs</Filter>
195+
</None>
193196
</ItemGroup>
194197
<ItemGroup>
195198
<Text Include=".readthedocs.yaml">

doc/docs/misc.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Miscelaneous Features
2+
=======================
3+
4+
This page collects various features that haven't been fully detailed or made their way into specific pages yet.
5+
6+
7+
## Terrain3DObjects
8+
9+
This node allows you to snap objects to the terrain when sculpting or moving.
10+
11+
Objects that are children of this node will maintain the same vertical offset relative to the terrain as they are moved laterally.
12+
13+
For example you can place a sphere on the ground, move it laterally where a hill exists, and it will snap up to the ground. Or you can lower the ground and the sphere will drop with the ground changes.
14+
15+
You can then adjust the vertical position of the sphere so it is half embedded in the ground, then repeat either of the above and the sphere will snap with the same vertical offset, half embedded in the ground.
16+
17+
To use it:
18+
* Add a new node
19+
* Find Terrain3DObjects
20+
* Add nodes as children of this node
21+
22+
23+
24+
## Minimal Shader
25+
26+
You'll find a shader that provides just the minimum needed to allow the terrain to work in `extras/minimum.gdshader`.
27+
28+
It includes no texturing.
29+
30+
Load this shader into the override shader slot and enable it. Customize as you see fit.

doc/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ Geometry clipmap mesh code created by `Mike J. Savage <https://mikejsavage.co.uk
102102

103103
docs/double_precision
104104
docs/integrating
105+
docs/misc
105106
docs/mobile_web
106107
docs/navigation
107108
docs/occlusion_culling
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
list=Array[Dictionary]([{
2+
"base": &"Node3D",
3+
"class": &"Terrain3DObjects",
4+
"icon": "",
5+
"language": &"GDScript",
6+
"path": "res://addons/terrain_3d/utils/terrain_3d_objects.gd"
7+
}])

project/project.godot

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ config_version=5
1212

1313
config/name="Terrain3D"
1414
run/main_scene="res://demo/Demo.tscn"
15-
config/features=PackedStringArray("4.1")
15+
config/features=PackedStringArray("4.2")
1616
config/icon="res://icon.svg"
1717

1818
[display]

0 commit comments

Comments
 (0)