Box2dFlash - 如何预测碰撞?
I made this monster cool game:
Just kidding.
My players are interested to see a line that predicts how the ball will bounce of wall or other balls.
Is that possible in Box2dFlash?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 Box2d 是可能的。
正如 Todd2d 建议但没有演示的那样,创建一个平行的 box2d 世界,一切都相同,然后逐步经历几个时间间隔并记录发生的情况,即球的位置。然后,您可以迭代此点列表并绘制显示球将行进的位置的线。
这会给人一种已经预测了其路径的错觉。
Its possible using Box2d.
As Todd2d suggests but doesn't demonstrate, is create a parallel box2d world with everything the same then step through several time intervals and record what happens i.e. the position of the ball. You can then iterate through this list of points and draw lines showing where the ball will travel.
This will give the illusion of having predicted its path.