diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml
index 44dc4f334fe..49278be44e8 100644
--- a/doc/classes/MeshLibrary.xml
+++ b/doc/classes/MeshLibrary.xml
@@ -4,7 +4,7 @@
Library of meshes.
- A library of meshes. Contains a list of [Mesh] resources, each with a name and ID. This resource is used in [GridMap].
+ A library of meshes. Contains a list of [Mesh] resources, each with a name and ID. Each item can also include collision and navigation shapes. This resource is used in [GridMap].
@@ -22,7 +22,8 @@
- Create a new item in the library, supplied as an ID.
+ Creates a new item in the library with the given ID.
+ You can get an unused ID from [method get_last_unused_item_id].
@@ -31,13 +32,14 @@
+ Returns the first item with the given name.
- Returns the list of items.
+ Returns the list of item IDs in use.
@@ -46,7 +48,7 @@
- Returns the mesh of the item.
+ Returns the item's mesh.
@@ -55,7 +57,7 @@
- Returns the name of the item.
+ Returns the item's name.
@@ -64,6 +66,7 @@
+ Returns the item's navigation mesh.
@@ -72,6 +75,7 @@
+ Returns the transform applied to the item's navigation mesh.
@@ -90,6 +94,8 @@
+ Returns an item's collision shapes.
+ The array consists of each [Shape] followed by its [Transform].
@@ -128,6 +134,7 @@
Sets the item's name.
+ This name is shown in the editor. It can also be used to look up the item later using [method find_item_by_name].
@@ -138,6 +145,7 @@
+ Sets the item's navigation mesh.
@@ -148,6 +156,7 @@
+ Sets the transform to apply to the item's navigation mesh.
@@ -158,6 +167,7 @@
+ Sets a texture to use as the item's preview icon in the editor.
@@ -168,6 +178,8 @@
+ Sets an item's collision shapes.
+ The array should consist of [Shape] objects, each followed by a [Transform] that will be applied to it. For shapes that should not have a transform, use [constant Transform.IDENTITY].
diff --git a/modules/gridmap/doc_classes/GridMap.xml b/modules/gridmap/doc_classes/GridMap.xml
index b762868f2c4..a140fc8ac67 100644
--- a/modules/gridmap/doc_classes/GridMap.xml
+++ b/modules/gridmap/doc_classes/GridMap.xml
@@ -4,10 +4,10 @@
Node for 3D tile-based maps.
- GridMap lets you place meshes on a grid interactively. It works both from the editor and can help you create in-game level editors.
- GridMaps use a [MeshLibrary] which contain a list of tiles: meshes with materials plus optional collisions and extra elements.
- A GridMap contains a collection of cells. Each grid cell refers to a [MeshLibrary] item. All cells in the map have the same dimensions.
- A GridMap is split into a sparse collection of octants for efficient rendering and physics processing. Every octant has the same dimensions and can contain several cells.
+ GridMap lets you place meshes on a grid interactively. It works both from the editor and from scripts, which can help you create in-game level editors.
+ GridMaps use a [MeshLibrary] which contains a list of tiles. Each tile is a mesh with materials plus optional collision and navigation shapes.
+ A GridMap contains a collection of cells. Each grid cell refers to a tile in the [MeshLibrary]. All cells in the map have the same dimensions.
+ Internally, a GridMap is split into a sparse collection of octants for efficient rendering and physics processing. Every octant has the same dimensions and can contain several cells.
https://docs.godotengine.org/en/latest/tutorials/3d/using_gridmaps.html
@@ -72,6 +72,7 @@
+ Returns an individual bit on the [member collision_layer].
@@ -80,20 +81,21 @@
+ Returns an individual bit on the [member collision_mask].
- Array of [Transform] and [Mesh] references corresponding to the non-empty cells in the grid. The transforms are specified in world space.
+ Returns an array of [Transform] and [Mesh] references corresponding to the non-empty cells in the grid. The transforms are specified in world space.
- Array of [Vector3] with the non-empty cell coordinates in the grid map.
+ Returns an array of [Vector3] with the non-empty cell coordinates in the grid map.
@@ -116,6 +118,7 @@
+ Returns the position of a grid cell in the GridMap's local coordinate space.
@@ -140,9 +143,9 @@
- Set the mesh index for the cell referenced by its grid-based X, Y and Z coordinates.
- A negative item index will clear the cell.
- Optionally, the item's orientation can be passed.
+ Sets the mesh index for the cell referenced by its grid-based X, Y and Z coordinates.
+ A negative item index such as [constant INVALID_CELL_ITEM] will clear the cell.
+ Optionally, the item's orientation can be passed. For valid orientation values, see [method Basis.get_orthogonal_index].
@@ -167,6 +170,7 @@
+ Sets an individual bit on the [member collision_layer].
@@ -177,6 +181,7 @@
+ Sets an individual bit on the [member collision_mask].
@@ -185,6 +190,8 @@
+ Returns the coordinates of the grid cell containing the given point.
+ [code]pos[/code] should be in the GridMap's local coordinate space.
@@ -202,13 +209,19 @@
The size of each octant measured in number of cells. This applies to all three axis.
+ The scale of the cell items.
+ This does not affect the size of the grid cells themselves, only the items in them. This can be used to make cell items overlap their neighbors.
The dimensions of the grid's cells.
+ This does not affect the size of the meshes. See [member cell_scale].
+ The physics layers this GridMap is in.
+ GridMaps act as static bodies, meaning they aren't affected by gravity or other forces. They only affect other physics bodies that collide with them.
+ The physics layers this GridMap detects collisions in.
The assigned [MeshLibrary].
@@ -222,6 +235,7 @@
+ Emitted when [member cell_size] changes.