碰撞检测和碰撞响应 [英] Collision Detection and Collision Response

查看:239
本文介绍了碰撞检测和碰撞响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直想在我的手再presenting几个移动/旋转使用机器人的Opengl对象。现在我想,让他们碰撞,实事求是地作出反应。

I've been trying my hand at representing a few moving/rotating objects using androids Opengl. Now I'd like to allow them to collide and respond realistically.

研究这个问题,我可以发现,告诉我关于如何确定两个3D形状是否碰撞在当前帧(或他们是否会被碰撞在下一帧)的资源。不过,我无法找到资源,描述如何获取有关所发生的冲突信息。

Researching the issue, I can find many resources that advise me on ways to determine whether two 3d shapes are colliding in the current frame (or whether they'll be colliding in the next frame). However, I'm having trouble finding resources describing how to get information about the collision that has occurred.

例如,使用凸的形状,我想知道哪个顶点相撞,其中第一个平面,在什么时间框架之间。这样我就可以知道了每个形状应在其位置和旋转响应。

For example, using convex shapes, I would want to know which vertex collided with which plane first, at what time in between the frame. This way I can know how each shape should respond in its position and rotation.

我可以描述每一个顶点与射线的运动,和所述平面的,以及所述运动,每个帧之间。不过,我有点难倒如何我会用它来寻找自己未来的交点随着时间的推移,以及这是否会永远的时间效率明智的。我读过的一些方法减少需要复杂的计算,如octtrees和打箱。

I can describe the motion of each vertex with a ray, and the motion of the planes as well, between each frame. However, I'm a little stumped as how I would use this to find their future intersections over time, and whether that would ever possible time efficiency wise. I've read of some methods for reducing the need for complex computations such as octtrees and hit boxes.

我是相当新的这个话题,所以任何资源,或对这些问题通常是如何处理将AP preciated建议。感谢您的时间!

I'm fairly new to this topic, so any resources, or advice on how these problems are usually handled would be appreciated. Thank you for your time!

推荐答案

有关碰撞检测你正在寻找的被称为连续碰撞检测的解决方案,并解释可能的此处找到。两个机构之间检测的接触是比较简单的,特别是如果你忽略角速度,但如果你正在做一个模拟了两个以上的对象,你将需要解决TOI全球范围内,因为冲突的订单将物质和无法通过检查隔离碰撞确定对(没那么简单)。

For collision detection the solution you are looking for is called continuous collision detection, and an explanation can be found here. Detecting contacts between two bodies is relatively simple, especially if you ignore angular velocities, but if you are doing a simulation with more than two objects you will need to solve TOI globally because the order of collisions will matter and cannot be determined by examining isolated collision pairs (not so simple).

你也应该说明你正试图解决特定的问题 - 因为找到TOI(冲击时)并不是一件容易的事情<一href="http://www.wildbunny.co.uk/blog/2011/03/25/speculative-contacts-an-continuous-collision-engine-approach-part-1/"相对=nofollow>和近似可能是在一定的情况下非常有效的解决方案(如游戏模拟)。

Also you should state the specific problem you are trying to solve - because finding TOI (time of impact) is not a trivial task and approximation could be perfectly valid solution in a certain scenario (eg. game simulation).

借助博客,我已经给了链接以包含关于这个问题的平易近人文章和参考资料进一步阅读,如果你想去超越。

The blog I already gave links to contains approachable articles on the subject and references further reading if you want to go in to beyond.

这篇关于碰撞检测和碰撞响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆