How to rotate tiles throught code

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By MrHells

The question is simple, how do I set the rotation of an individual cell through GdScript?

I want to rotate it as you do pressing A and S, but everything I see is the option to flip both X and Y axis

:bust_in_silhouette: Reply From: jgodfrey

AFAIK, a simple tile rotation isn’t directly supported. However, you can accomplish this via various combinations of flip and transpose in the set_cell() call - as described in this post.

1 Like