box2d碰撞组 [英] box2d collision groups

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

问题描述

是否有人知道仅在(body1.categoryBits& body2.maskBits)&& (body1.maskBits& body2.categoryBits)?
还是它们在(body1.categoryBits& body2.maskBits)||时已经发生冲突? (body1.maskBits& body2.categoryBits)吗?

does anyone know whether bodies only collide when (body1.categoryBits & body2.maskBits) && (body1.maskBits & body2.categoryBits) ? or do they already collide when (body1.categoryBits & body2.maskBits) || (body1.maskBits & body2.categoryBits) ?

推荐答案

如果有人仍在寻找更多的解释,我会做一个详细的教程此处:

http:// aurelienribon .wordpress.com / 2011/07/01 / box2d-tutorial-collision-filtering /

If anyone is still looking for more explanations, I made a detailed tutorial here :
http://aurelienribon.wordpress.com/2011/07/01/box2d-tutorial-collision-filtering/

这篇关于box2d碰撞组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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