3D赛车游戏碰撞检测

发布于 2024-09-09 08:12:09 字数 47 浏览 1 评论 0原文

有人可以解释一下《极品飞车》或《全军覆没》等游戏中赛道的碰撞检测是如何工作的吗?

Can somebody explain how the collision detection works for race tracks in games like need for speed or wipeout?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

风月客 2024-09-16 08:12:09

我发现了一篇图文并茂的文章,描述了赛车游戏中的汽车。它还具有碰撞检测概念的一般描述

对于轨道碰撞检测,您可以使用类似于 这里。本质上,您只需以不同的颜色绘制包含您的轨迹的地图即可。然后,您从地图上读取汽车投影位置的颜色 - 如果是轨道颜色,则发生碰撞。

我发现了另一篇看似不错的文章,描述了基本的 2D 碰撞检测算法。

HTH。

I found a well illustrated article describing collision detection between the cars in a racing game. It also has a general description of the concepts of collision detection.

For the track collision detection you could use something like the color map approach discussed here. Essentially you just draw a map containing your track in a distinct color. Then you read the color at the projected position of the car from the map - if it's the tracks color you have a collision.

I found another seemingly good article describing basic 2D collision detection algorithms.

HTH.

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