花栗鼠碰撞检测 [英] Chipmunk collision detection
问题描述
我对花栗鼠完全陌生,我刚刚使用了几天,所以我猜这是很明显的,但我找不到任何文件。有没有任何回调或方法在chipmunk告诉你,2个给定的形状碰撞?。
如果不是最好的方法简单地使用cgrectcontains精灵。 / p>
-Oscar
您可以从Ipthnc的链接,但这是您可能需要的文档 - 它详细描述了碰撞回调系统:
http://chipmunk-physics.net/release/ChipmunkLatest-Docs/#CollisionCallbacks
I am completely new to chipmunk and I have just been using it for a few days, so I'm guessing this is something pretty obvious, however I cannot find any documentation for this. Is there any callback or method in chipmunk that tells you that 2 given shapes have collided?.
If not is the best way to simply use cgrectcontains on the sprites?.
-Oscar
You can get to it from Ipthnc's link, but this is the documentation you're probably looking for - it details the collision callback system:
http://chipmunk-physics.net/release/ChipmunkLatest-Docs/#CollisionCallbacks
这篇关于花栗鼠碰撞检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!