Panda3D手册:碰撞检测

Collision detection allows for two objects to bump into each other and react. This includes not only sending messages for events, but also to keep the objects from passing through each other. Collision detection is a very powerful tool for immersion, but it is somewhat complex.
碰撞检测能够对两个物体的碰撞作出反应。体它不仅能发送消息,它还能保持两个物体之间的距离。碰撞检测是一个非常强大的工具,但是它比较复杂。

There are two ways to go about collision detection. One is to create special collision geometry, such as spheres and polygons, to determine collisions. The other is to allow collisions against all geometry. While the first is somewhat more complex and takes more effort to implement, it is much faster to execute and is a better long-term solution. For quick-and-dirty applications, though, collision with geometry can be a fine solution.
进行碰撞检测有两个途径。一个是建立碰撞几何体,比如一个区域或是一个多边形,这样可以检测碰撞。另一种方法是检测所有几何体的碰撞。虽然第一种方法使用起来比较麻烦,但是它的速度比较快,可以反复的使用。但是对于 quick-and-dirty(快速但存在瑕疵)的应用,可以使用几何体检测。

This section of the manual will address both methods.
本章节将讨论这两种方法。