https://www.youtube.com/watch?v=69sBjqMtZCc
转载自油管Memory Leak,链接以上
使用 Springs 和 Sprite Shape 的 Unity 交互式 2D 水。 本教程以类似的方式制作,您可以通过不同的示例逐步了解如何创建 2D 水。
介绍:(00:00)
创建弹簧运动:(00:40)
阻尼运动:(02:25)
冲击时弹簧之间的传播运动:(02:57)
用 sprite 形状创建一个形状:(04:07)
向精灵形状动态添加点:(05:20)
用弹簧移动精灵形状的波浪:(07:06)
光滑的波浪:(08:42)
更新波数:(09:30)
创建冲击波:(10:27)
添加浮力 2d:(11:48)
结尾:(12:23)
完整项目:https://github.com/MemoryLeakHub/Water2D-Unity
平滑函数:https://github.com/Unity-Technologies/2d-spriteshape-samples/blob/master/Assets/Unity%20Technologies/2D%20SpriteShape/Extras/Scripts/SimpleDraw.cs
带弹簧的 2D 波浪:https://gamedevelopment.tutsplus.com/tutorials/make-a-splash-with-dynamic-2d-water-effects--gamedev-236
波浪的戈多教程:https://www.youtube.com/watch?v=RXIRkou021U