How To Rotate Tiles with Code in Godot
HTML-код
- Опубликовано: 11 май 2024
- In this video I will explain how to rotate tilemap tiles in Godot using code.
The editor has buttons that allow you to rotate and mirror tiles when creating a tilemap, but this is more difficult when you need to modify your tilemap in the game at run time.
This video gives the code that I used to achieve this in my automation game.
Well done the coding logic, and well done the video about it. Thanks for sharing!
Thanks!
Good job ❤
More godot content please
Cheers :)
Weird way to figure out I'm a mother, getting a mother's day gift from coding with Russ.
how can i rotate a tile by a custom amount, in the editor? im using hexagons, and rotating 90° isnt exxactly helpful
Great video and good to know these possible nuances but is it not possible to just rotate the tile "normally" by 90, 180, 270 degrees? (Probably using the deg_to_rad method) and then having rhat data saved so its remembered?
Maybe theres some other logic im missing like the sprite being rotated but not the direction that items move? Just spitballing here
I expected there would be a way to rotate the tiles like you described but I couldn't find anything in godot that would do that. An individual sprite2D could be rotated easily enough but that didn't seem to be the case for a tilemap tile since there just isn't a method for rotating tiles with code.
Hopefully it is something that gets simplified in future versions of godot.
Well done
Thanks :)
sir sir pls tell me why the buttonmodule is not downloading using pip sir pls tell me sir i have less time pls pls sir a humble request from me