- _updateOctantsCallback
void _updateOctantsCallback()
- clear
void clear()
- clearBakedMeshes
void clearBakedMeshes()
- getBakeMeshInstance
RID getBakeMeshInstance(long idx)
- getBakeMeshes
Array getBakeMeshes()
- getCellItem
long getCellItem(long x, long y, long z)
The MeshLibrary item index located at the grid-based X, Y and Z coordinates. If the cell is empty, INVALID_CELL_ITEM will be returned.
- getCellItemOrientation
long getCellItemOrientation(long x, long y, long z)
The orientation of the cell at the grid-based X, Y and Z coordinates. -1 is returned if the cell is empty.
- getCellScale
double getCellScale()
- getCellSize
Vector3 getCellSize()
- getCenterX
bool getCenterX()
- getCenterY
bool getCenterY()
- getCenterZ
bool getCenterZ()
- getCollisionLayer
long getCollisionLayer()
- getCollisionLayerBit
bool getCollisionLayerBit(long bit)
- getCollisionMask
long getCollisionMask()
- getCollisionMaskBit
bool getCollisionMaskBit(long bit)
- getMeshLibrary
Ref!MeshLibrary getMeshLibrary()
- getMeshes
Array getMeshes()
Array of Transform and Mesh references corresponding to the non empty cells in the grid. The transforms are specified in world space.
- getOctantSize
long getOctantSize()
- getTheme
Ref!MeshLibrary getTheme()
- getUsedCells
Array getUsedCells()
Array of Vector3 with the non empty cell coordinates in the grid map.
- makeBakedMeshes
void makeBakedMeshes(bool gen_lightmap_uv, double lightmap_uv_texel_size)
- mapToWorld
Vector3 mapToWorld(long x, long y, long z)
- opAssign
GridMap opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
- opEquals
bool opEquals(GridMap other)
Undocumented in source. Be warned that the author may not have intended to support it.
- opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
- resourceChanged
void resourceChanged(Resource resource)
- setCellItem
void setCellItem(long x, long y, long z, long item, long orientation)
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.
- setCellScale
void setCellScale(double scale)
- setCellSize
void setCellSize(Vector3 size)
- setCenterX
void setCenterX(bool enable)
- setCenterY
void setCenterY(bool enable)
- setCenterZ
void setCenterZ(bool enable)
- setClip
void setClip(bool enabled, bool clipabove, long floor, long axis)
- setCollisionLayer
void setCollisionLayer(long layer)
- setCollisionLayerBit
void setCollisionLayerBit(long bit, bool value)
- setCollisionMask
void setCollisionMask(long mask)
- setCollisionMaskBit
void setCollisionMaskBit(long bit, bool value)
- setMeshLibrary
void setMeshLibrary(MeshLibrary mesh_library)
- setOctantSize
void setOctantSize(long size)
- setTheme
void setTheme(MeshLibrary theme)
- worldToMap
Vector3 worldToMap(Vector3 pos)
- cellCenterX
bool cellCenterX [@property getter]
bool cellCenterX [@property setter]
If true grid items are centered on the X axis.
- cellCenterY
bool cellCenterY [@property getter]
bool cellCenterY [@property setter]
If true grid items are centered on the Y axis.
- cellCenterZ
bool cellCenterZ [@property getter]
bool cellCenterZ [@property setter]
If true grid items are centered on the Z axis.
- cellOctantSize
long cellOctantSize [@property getter]
long cellOctantSize [@property setter]
The size of each octant measured in number of cells. This applies to all three axis.
- cellScale
double cellScale [@property getter]
double cellScale [@property setter]
- cellSize
Vector3 cellSize [@property getter]
Vector3 cellSize [@property setter]
The dimensions of the grid's cells.
- collisionLayer
long collisionLayer [@property getter]
long collisionLayer [@property setter]
- collisionMask
long collisionMask [@property getter]
long collisionMask [@property setter]
- meshLibrary
MeshLibrary meshLibrary [@property getter]
MeshLibrary meshLibrary [@property setter]
- theme
MeshLibrary theme [@property getter]
MeshLibrary theme [@property setter]
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.