简体   繁体   English

libGDX中的2D水效果

[英]2D Water effect in libGDX

I'm working with libGDX and I'd like to reproduce the water behavior we can find in games like Terraria or Go To Hell. 我正在使用libGDX,我想重现在Terraria或Go To Hell等游戏中可以找到的水行为。 The water must be able to flow under the effect of gravity and adapt it's shape to the container's shape. 水必须能够在重力作用下流动,并使水的形状适应容器的形状。

Actually I don't really know were to start, therefore I have no code to show. 其实我真的不知道要开始,所以我没有代码显示。 I found some tutorial for water effects like reflexion or physics with Box2D, but nothing that I want for my project. 我找到了一些关于水效应的教程,例如Box2D的反射或物理效果,但是我的项目并不需要任何东西。 If you have some clue it'd be great. 如果您有一些线索,那就太好了。

Thanks ! 谢谢 !

The water effect can be achieved by using LiquidFun physics engine based on Box2D. 通过使用基于Box2D的LiquidFun物理引擎可以实现水的效果。 There is an LiquidFun extension for LibGDX available. 有一个LibGDX的LiquidFun扩展

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM