@sbritorodr
In SM63R, water is essentialy an animated polygon with a surface "shader" which calculates interactive waves. The last part can lead to some issues and problems, if the polygon is created incorrectly.
- At least 4 or more points
- The surface must be completely horizontal. If not, the water is completely static and touching the surface crashes the game.
- The angle of both vertices should be 90º. If not, it flickers
- The poligon surface can be splitted into two segments, but each segment must be at the same height (instert two images provided by @jaschutte)
The bottom of the water polygon can be any shape you want. Example: (Insert img of tutorial_1_3 water with some annotations)
- Search
water.tscnin the bottom left panel of godot. Drag and drop the file to your current level - A red square should appear to your level and a water sprite should appear on the top left pannel of godot.
- Select the water sprite and inside inspector look for the "polygon" script variable.
- Click on
PoolVector2Array. You will see all the vertices of the water polygon (by default is 4) - Change each point manually. Use the Ruler Tool to help you place the vertices at the correct x/y coordinate.
- Check if all mandatory properties are as explained above.
- Change the Z index parameter if the water is on top of the terrain.
- Make the water polygon bigger than the hole made in the terrain, this way you can hide the sides of the water polygon.
- Do not scale up the polygon using the scale tool or changing the scale water property under inspector, because the water texture will be scaled as well.