summaryrefslogtreecommitdiff
path: root/modules/gltf
diff options
context:
space:
mode:
authorMicky <micheledevita2@gmail.com>2022-08-20 18:39:05 +0200
committerMicky <micheledevita2@gmail.com>2022-09-05 18:08:39 +0200
commit694190a354c1634caaff5cbd7357de345a334c01 (patch)
tree3caa05876de5bd4ac51860434ba4665ddd34d75e /modules/gltf
parent90801a415314f29eb5c590f85a7751443e54b83a (diff)
Rename TileMap/GridMap.`world_to_map` and opposite to `local_to_map`
For both TileMap and GridMap: - `world_to_map` -> `local_to_map` - `map_to_world` -> `map_to_local` Also changes any mention of "world" in this context to "local" to avoid future confusion. Finally, updates the docs of both methods for consistency. In particular, adding a note on how to convert the returned values from local to global coordinates and vice versa.
Diffstat (limited to 'modules/gltf')
-rw-r--r--modules/gltf/gltf_document.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp
index 61af58bda7..6cb398b5f8 100644
--- a/modules/gltf/gltf_document.cpp
+++ b/modules/gltf/gltf_document.cpp
@@ -5271,7 +5271,7 @@ void GLTFDocument::_convert_grid_map_to_gltf(GridMap *p_grid_map, GLTFNodeIndex
cell_xform.basis.scale(Vector3(p_grid_map->get_cell_scale(),
p_grid_map->get_cell_scale(),
p_grid_map->get_cell_scale()));
- cell_xform.set_origin(p_grid_map->map_to_world(
+ cell_xform.set_origin(p_grid_map->map_to_local(
Vector3(cell_location.x, cell_location.y, cell_location.z)));
Ref<GLTFMesh> gltf_mesh;
gltf_mesh.instantiate();