From 7ef16ca136f0e5fc82b5808d53cffbd13653c6f6 Mon Sep 17 00:00:00 2001 From: James Westman Date: Fri, 29 Nov 2019 18:21:34 -0600 Subject: Docs: GridMap and MeshLibrary The only methods left to document are resource_changed, set_clip, and the methods dealing with baked meshes. --- modules/gridmap/doc_classes/GridMap.xml | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'modules') diff --git a/modules/gridmap/doc_classes/GridMap.xml b/modules/gridmap/doc_classes/GridMap.xml index b762868f2c..a140fc8ac6 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. -- cgit v1.2.3