Rotating a tile in a tilemap using gdscript

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By CyttilDalionzo
:warning: Old Version Published before Godot 3 was released.

I have a tilemap containing all the objects a user can place in the game. I know that I can flip the X and Y axis within the set_cell function, but how can I actually freely rotate a tile (e.g. 90 degrees, 180 degrees, 270 degrees)?

Thanks in advance!

:bust_in_silhouette: Reply From: puppetmaster-

You need to use the transpose flag:

set_cell ( int x, int y, int tile, bool flip_x=false, bool flip_y=false, bool transpose=false )

You can see the state in editor when rotating a tile manually.