Arnklit / Waterways

A tool to generate river meshes with flow and foam maps based on bezier curves.
https://github.com/Arnklit/WaterGenGodotDemo
MIT License
1.05k stars 72 forks source link

WaterSystems instantiated into other scenes do not work correctly #6

Open Arnklit opened 3 years ago

Arnklit commented 3 years ago

Describe the bug If a WaterSystem is instantiated into another scene, it might not be at the same coordinates and therefore the coordinates used for the height and flow maps are no longer valid. This will also cause issues with the auto assign of the textures and coordinates for use in Custom shaders as this happens on texture generation and therefore will only work withing the local scene.

Expected behavior Have the node calculate an offset to the coordinates based on it's world position at run time. Also have the auto assign happen on enter_tree / ready as well as on generate.