如何在android中弯曲位图

发布于 2024-12-07 02:12:16 字数 160 浏览 1 评论 0原文

我正在开发一个游戏,我想在屏幕上自由移动的物体的尾部产生烟雾效果。我刚刚创建了一个位图并将其附加在对象的末尾,但问题是这看起来不太好,因为当对象转向新角度时,效果不会自行弯曲。我只想知道我该怎么做?是否有可能为位图提供曲线或其他解决方案?我想在自行车尾部添加烟雾效果。我希望有人能为我提供解决方案。 谢谢

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

倾城°AllureLove 2024-12-14 02:12:16

是的。最后我自己得到了答案,所以与大家分享。
我想要的是在移动物体的尾部产生烟雾效果,这样当物体在屏幕上轮流时,尾部应该做同样的事情。
我所做的就是拍摄四张位图图像,组合起来会产生烟雾效果。
我记录了船经过的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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文