AndEngine粒子系统
我想使用 AndEngine 的粒子系统来创建飞溅(如溅水)。
我已经检查了粒子系统示例,但不太确定需要做什么才能使用粒子系统创建水的飞溅效果。
有什么想法吗?
I would like to use AndEngine's particle system to create a splash(as in splashing water).
I have checked out the particle system example, but not really sure on what needs to be done to create a splash affect of water using the particle system.
Any idea's?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道任何水花模拟算法,所以我会按照我的想法去做,但你必须修改以使其看起来真实。
2D 水花动画会从一个位置创建许多小水滴,然后以初始速度将每个水滴发送到不同的方向,然后每个水滴减慢速度并淡出。
试试这个:
我还没有测试过,但我认为它会起作用。尝试使用这些值来找到看起来逼真的动画。
该方法接收一个参数,该参数是每个粒子的就绪纹理区域,在您的情况下,我猜那是一个水滴。
调用此方法并获取
ParticleSystem
后,只需将其附加到您的场景即可:I don't know of any water splash simulation algorithms, so I'll do what I think, but you will have to modify to make it look real.
Water splash animation in 2D will create many small water drops from a single location, then send each one in a different direction with an initial velocity, then each water drop slows down and fades out.
Try this out:
I haven't tested it, but I think it'd work. Try playing with the values to find an animation which looks reallistic.
The method receives an argument which is a ready texture region for each particle, in your case I guess that'd be a water drop.
After you call this method and get a
ParticleSystem
, just attach it to your scene: