I want to make grass that can be edited in game like GitHub - CaptainProton42/2DGrassShaderDemo · GitHub (minus the shaders and wind) but the tutorial is outdated and doesn’t explain everything. Any help or different ways to do this?
You can have different states of grass (e.g. none, short, medium, tall) represented by different tiles.
I looked at the shader code a bit more. There is a live demo the author uploaded.
The shader you linked works by first setting the colour of a texture (as defined in DrawTexture.gd) to between RGB (0,0,0) and RGB (8,0,0). This represents different grass heights, and can be changed by the slider. The shader code then makes this texture look like grass.
To modify this, you would need to basically recreate a lot of TileMap’s functionality to make it easy to interact with in the game world. If you do not understand the demo, then it is probably best to stick with the TileMap.
Thank you so much! I have a nother question can I use if statements to keep moving things (like enemies) on a certain type of tile or do I need to use something else to detect boundaries?
I am not familiar with nav meshes in Godot. There’s a solved thread that talks about using NavPolygons and some considerations. There’s another thread about generating one dynamically.