How to flip my tilemap with enemies and objects but the character?

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

When you press certain button, the map is flipped vertical or horizontally with all the entities but the main character.
How i could do that? And also make the character always be in top of the nearest tile to stand (because the ceiling becomes the floor and viceversa if flipped vertically)

:bust_in_silhouette: Reply From: Reloecc

A) In case your character needs to be nested into tilemap, flip both character and tilemap to visually flip tilemap only
B) Use scale.y = -1 * zoom to flip whole tilemap (and/or character)
C) I see no future issues with gravity if flipped this way (presuming you are using move_and_slide())