|
| 1 | +# 3D height map |
| 2 | + |
| 3 | +<img src="https://asset-resources.gdevelop.io/public-resources/Icons/10e0a26c0d500830dfe23b94138beb0ef61607ba62bca05a5aa5c849777f1b06_terrain.svg" class="extension-icon"></img> |
| 4 | +A terrain with hills where 3D physics objects can stand. |
| 5 | + |
| 6 | +**Authors and contributors** to this community extension: [D8H](https://gd.games/D8H). |
| 7 | + |
| 8 | +!!! warning |
| 9 | + This is an extension made by a community member — but not reviewed |
| 10 | + by the GDevelop extension team. As such, we can't guarantee it |
| 11 | + meets all the quality standards of official extensions. In case of |
| 12 | + doubt, contact the author to know more about what the extension |
| 13 | + does or inspect its content before using it. |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | +A terrain with hills where objects with the 3D physics behavior can stand. |
| 18 | + |
| 19 | +A terrain can be built from: |
| 20 | + |
| 21 | +- an image file |
| 22 | +- noise function ([open the project online](https://editor.gdevelop.io/?project=example://3d-endless-terrain)) |
| 23 | + |
| 24 | + |
| 25 | +[Read more...](/gdevelop5/extensions/height-map3d/details) |
| 26 | + |
| 27 | +!!! tip |
| 28 | + Learn [how to install new extensions](/gdevelop5/extensions/search) by following a step-by-step guide. |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | +## 3D height map |
| 33 | + |
| 34 | +A terrain with hills in 3D. |
| 35 | + |
| 36 | +### Object actions |
| 37 | + |
| 38 | +**Update height map** |
| 39 | +Update the height map. This is done automatically at the end of every frame, but it can be used manually to avoid a 1-frame delay. |
| 40 | + |
| 41 | +**Load height map** |
| 42 | +Load a height map from an image file. |
| 43 | + |
| 44 | +**Grid value** |
| 45 | +Change the field value at a grid index. The value is bewteen 0 and 1. |
| 46 | + |
| 47 | +### Object conditions |
| 48 | + |
| 49 | +**Field point Z** |
| 50 | +Compare the field Z for a given position in the scene. |
| 51 | + |
| 52 | +**Grid dimension X** |
| 53 | +Compare the number of points in the grid on X axis. |
| 54 | + |
| 55 | +**Grid dimension Y** |
| 56 | +Compare the number of points in the grid on Y axis. |
| 57 | + |
| 58 | +**Grid value** |
| 59 | +Compare the field value at a grid index. The value is bewteen 0 and 1. |
| 60 | + |
| 61 | +### Object expressions |
| 62 | + |
| 63 | +| Expression | Description | | |
| 64 | +|-----|-----|-----| |
| 65 | +| `Object.FieldZ(number, number)` | Return the field Z for a given position in the scene. || |
| 66 | +| | _🔢 Number_ | X position in the scene | |
| 67 | +| | _🔢 Number_ | Y position in the scene | |
| 68 | +| `Object.GridDimensionX()` | Return the number of points in the grid on X axis. || |
| 69 | +| `Object.GridDimensionY()` | Return the number of points in the grid on Y axis. || |
| 70 | +| `Object.GridValue(number, number)` | Return the field value at a grid index. The value is bewteen 0 and 1. || |
| 71 | +| | _🔢 Number_ | X grid index | |
| 72 | +| | _🔢 Number_ | Y grid index | |
| 73 | + |
| 74 | +## 3D physics height map |
| 75 | + |
| 76 | +A terrain with hills where 3D physics objects can stand. |
| 77 | + |
| 78 | +_No expressions for this behavior._ |
| 79 | + |
| 80 | + |
| 81 | +--- |
| 82 | + |
| 83 | +*This page is an auto-generated reference page about the **3D height map** extension, made by the community of [GDevelop, the open-source, cross-platform game engine designed for everyone](https://gdevelop.io/).* Learn more about [all GDevelop community-made extensions here](/gdevelop5/extensions). |
0 commit comments