【发布时间】:2018-08-07 03:09:30
【问题描述】:
我正在制作一个带有简单矩形棱柱碰撞的 3D 物理引擎,没有旋转。
现在,我正在非常简单地进行碰撞:(请参阅 this website 以获得漂亮的图形和更多信息)
let a and b be rectangular prisms
collide if:
(min x of a <= max x of b AND max x of a >= min x of b) AND
(min y of a <= max y of b AND max y of a >= min y of b) AND
(min z of a <= max z of b AND max z of a >= min z of b)
这很好用,但我需要知道矩形碰撞到哪个表面才能确定如何反弹。
是否有公式可以检测两个矩形棱镜碰撞到哪个面?
【问题讨论】:
标签: 3d collision-detection game-physics physics collision