Source Code: Godot 2D Multimeshinstance2D Swaying Grass
A downloadable project
Downloadable source code. This would not be possible without all the help I've gotten from various sources over the years!
Features:
"Y-Sorting" for any amount of objects. Individual swaying for each grass tuft. Decent performance (1100 FPS on RX 5700).
How to:
It uses rows of MultimeshInstance2D. This is so we can use position.y = z_index as a Y-Sort replacement for the grass and actors. Then we use some shader code on the textures to make them sway. Limiting factor of performance is number of rows.
Todo:
Since z_index has some limitations on max value it might be best to set z_index in relation to the camera for each object if using larger levels.
And it might be best to relocate the rows of grass to follow the camera.
Published | 20 days ago |
Status | On hold |
Category | Other |
Author | markolainen |
Download
Click download now to get access to the following files:
Leave a comment
Log in with itch.io to leave a comment.