如何在android中弯曲位图
我正在开发一个游戏,我想在屏幕上自由移动的物体的尾部产生烟雾效果。我刚刚创建了一个位图并将其附加在对象的末尾,但问题是这看起来不太好,因为当对象转向新角度时,效果不会自行弯曲。我只想知道我该怎么做?是否有可能为位图提供曲线或其他解决方案?我想在自行车尾部添加烟雾效果。我希望有人能为我提供解决方案。 谢谢
I am developing a game and I want to give a smoke effect at the tail of the objects moving freely on the screen. I just created a bitmap and attached it at the end of object but the problem is that this doesn't look good because when the objects turns towards a new angle the effect doesn't curve it self. All I want is to know that how can I do this? Is there any possibility to give curve to the bitmap or another solution? I want to give a smoke effect at the tail of a bike. I hope someone will provide me a solution.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的。最后我自己得到了答案,所以与大家分享。
我想要的是在移动物体的尾部产生烟雾效果,这样当物体在屏幕上轮流时,尾部应该做同样的事情。
我所做的就是拍摄四张位图图像,组合起来会产生烟雾效果。
我记录了船经过的X点和Y点,然后在这些点上绘制位图,这解决了我的问题。我希望有一天它能对其他人有所帮助,所以我分享了它。
谢谢
Yes. Finally I got the answer myself so sharing it with you.
What I wanted was to give a smoke effect at the tail of a moving object such that when the object take turns in screen the tail should do the same.
What I do us that I take four bitmap images which gives a smoke effect when combined.
I recorded the points X and Y which the boat has passed from and then drew the bitmap on these points which solved my problem. I hope it will help someone else someday so I shared it.
Thanks