Godot Version
Godot 4.3
Question
I’m kinda new to godot, and I am making a game where users can go around and chop down trees. Because there are a lot of trees, and their locations are procedurally generated, each one is a tile on a TileMapLayer. I want the trees to shake when the player hits them, but can’t seem to figure this out. Spent about an hour trying to figure out shaders, but they seem to behave weirdly on tiles. Is the only way really to create a sprite each time? Any help is appreciated.
You can create a tree scene with the specified behaviour and then create a “Scenes Collection” on the tilesest. This allows you to place scenes as tiles inside the tilemap
2 Likes
Thanks, seems like a bit of a headache though. I actually have more than just trees, I just used them as an example.
Why is it a headache? It seems pretty straightforward to me. how do you imagine it being easier to use?
Just because I have a bunch of tiles with data about them in custom data layers, and one script in the tilemap node to manage things. In my use case it seems like a lot of work to move the tiles to new scenes, especially because some of them are different sizes. Probably just me, but it feels like there should be an easier way to achieve something so simple.
So you just want to rotate them? You can create alternate tiles that are the same but rotated
https://godotengine.org/asset-library/asset/2926
Try looking at this demo from the official godot site
Sorry if i was being unclear; I know that you can rotate tiles in increments of 90 degrees trough transforms and transposes, I was hoping to rotate in smaller amounts. Its fine though, I decided its not worth the hassle for my game.
yeah unfortuantely this wont work with tiles. The only option is the afore mentioned scenes collection