花栗鼠碰撞检测 [英] Chipmunk collision detection

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

问题描述

我对花栗鼠完全陌生,我刚刚使用了几天,所以我猜这是很明显的,但我找不到任何文件。有没有任何回调或方法在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屋!

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