Bullet3物理引擎碰撞检测相关代码片段

近期公司要做多人末日生存类手游(对就是吃鸡!!)
所以笔者兴趣爱好就是钻研!
所以自己课下就调研下同步、碰撞检测、射线检测、移动寻路系统、定点数

在调研碰撞检测过程中,发现某Moba游戏源码中有相关片段,已经记录在博客中。
今天在调研git上开源的物理引擎,调研到Bullet3(三大物理引擎),发现曾经有cocos手游有接入过该系统(同为c++)
发现Bullet3可以集成到lua源码中,发现提供了不少现成API。
所以本帖作为调研记录,持续更新

搜索关键词:[Bullet3]常见物体和初始化

碰撞世界btCollisionWorld.h

///contactTest performs a discrete collision test between two collision objects and calls the resultCallback if overlap if detected.
///it reports one or more contact points (including the one with deepest penetration)
void    btCollisionWorld::contactPairTest(btCollisionObject* colObjA, btCollisionObject* colObjB, ContactResultCallback& resultCallback)

相关API
bullet3-2.86.1\examples\Collision

猜你喜欢

转载自blog.csdn.net/tj134679258/article/details/78074263