diff options
author | Goldenlion5648 <coboudinot@gmail.com> | 2024-04-30 09:16:54 -0400 |
---|---|---|
committer | Goldenlion5648 <coboudinot@gmail.com> | 2024-04-30 09:16:54 -0400 |
commit | d2ea303560a8069b4d95b224cf01c737112af339 (patch) | |
tree | 3663e20f9195e15314d3bc0bc70d68fde6f39890 | |
parent | 89850d553eeb259e208d0c577cd7bc1eabd3a90a (diff) | |
download | redot-engine-d2ea303560a8069b4d95b224cf01c737112af339.tar.gz |
document 0, 90, 180, and 270 degree TileMap cell rotations
-rw-r--r-- | doc/classes/TileSetAtlasSource.xml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/classes/TileSetAtlasSource.xml b/doc/classes/TileSetAtlasSource.xml index 6f212274f8..a34ca0ce91 100644 --- a/doc/classes/TileSetAtlasSource.xml +++ b/doc/classes/TileSetAtlasSource.xml @@ -295,6 +295,15 @@ # If tile is not already flipped, flip it. $TileMap.set_cell(0, Vector2i(2, 2), source_id, atlas_coords, alternate_id | TileSetAtlasSource.TRANSFORM_FLIP_H) [/codeblock] + [b]Note:[/b] These transformations can be combined to do the equivalent of 0, 90, 180, and 270 degree rotations, as shown below: + [codeblock] + enum TileTransform { + ROTATE_0 = 0, + ROTATE_90 = TileSetAtlasSource.TRANSFORM_TRANSPOSE | TileSetAtlasSource.TRANSFORM_FLIP_H, + ROTATE_180 = TileSetAtlasSource.TRANSFORM_FLIP_H | TileSetAtlasSource.TRANSFORM_FLIP_V, + ROTATE_270 = TileSetAtlasSource.TRANSFORM_TRANSPOSE | TileSetAtlasSource.TRANSFORM_FLIP_V, + } + [/codeblock] </constant> <constant name="TRANSFORM_FLIP_V" value="8192"> Represents cell's vertical flip flag. See [constant TRANSFORM_FLIP_H] for usage. |