基于力的图表:3D 边缘碰撞

发布于 2024-10-12 12:44:04 字数 203 浏览 6 评论 0原文

想象一个带有碰撞边缘的基于力的移动 3D 图形。编写一个特定的物理引擎来计算边缘(绳子、绳索)碰撞以便每个对象的行为就像在现实世界中一样容易吗?弦应该弯曲,节点应该相互排斥,等等。超越视觉识别的准确性“看起来真实”并不重要,这只是一个游戏。

编辑:也许我忘了提及,将边缘近似为多段字符串是我能想到的唯一选择。

是的,是否有可能将这种物理扩展到数百或数千个边缘?

Imagine a moving 3D force-based graph with colliding edges. How easy it is to write a specific physics engine for calculating edge (strings, ropes) collision so that every object would behave like in a real world? Strings should bend, nodes should repulse each other, etc. Accuracy beyond visual recognition as "looks real" doesn't matter, it's a game.

Edit: Maybe I forgot to mention, that approximating edges as multi-segmented strings is the only option I can think of.

And yes, would it be possible to scale such physics to hundreds or thousands of edges?

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

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

发布评论

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

评论(1

心头的小情儿 2024-10-19 12:44:04

物理引擎中有很多小细节,以确保最终结果“看起来真实”。除非您想学习,否则我不建议您编写代码。从可用且免费的东西开始,例如BulletPhysics

此外,您可以花更少的时间编写物理引擎,而花更多的时间编写游戏。双赢。

编辑:

如果您确实想自己编程,请查看 实时碰撞检测,这是关于该主题的相当明确的信息。

Physics engines have a lot of minor details in them to ensure that the end result 'looks real'. I would not recommend coding one unless you are looking to learn. Start with something that works and is free, such as Bullet Physics.

Besides, then you get to spend less time coding a physics engine and more time coding a game. Win-Win.

EDIT:

If you really want to program your own however, take a look at Real Time Collision Detection, which is pretty definitive information on the subject.

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