基于力的图表:3D 边缘碰撞
想象一个带有碰撞边缘的基于力的移动 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
物理引擎中有很多小细节,以确保最终结果“看起来真实”。除非您想学习,否则我不建议您编写代码。从可用且免费的东西开始,例如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.