简体   繁体   English

AndEngine Box2D身体GetContactList

[英]AndEngine Box2D Body GetContactList

Ive been trying to learn the Physics Box2D Extension for AndEngine and I have been reading http://www.box2d.org/manual.html#_Toc258082975 我一直在尝试学习AndEngine的Physics Box2D扩展,并且我一直在阅读http://www.box2d.org/manual.html#_Toc258082975

Under "9.3 Accessing Contacts" it says 在“ 9.3访问联系人”下说

You can also iterate over all the contacts on a body 您还可以遍历身体上的所有接触

My understanding is that I should be able to do 我的理解是我应该能够

myBody().GetContactList()

But I cant seem to find it. 但我似乎找不到它。 Am I missing something here? 我在这里想念什么吗? should I be able to do this? 我应该能够做到这一点吗?

Thanks in advance 提前致谢

EDIT: 编辑:

ok, I've looked in Body.java for the Box2DExtension and found 好的,我在Body.java中查找了Box2DExtension并发现

// ArrayList<ContactEdge> getContactList()
// {
// return contacts;
// } 

commented out, does anybody know why. 注释掉了,有人知道为什么吗。 I will still have a look but if anybody could find the answer quicker than me it would be greatly appreciated 我仍然会看一下,但是如果有人能比我更快地找到答案,将不胜感激

Thought id share what I found: After more googling I found this where it is explained that the Box2d extension is pulled from libgdx and the file that is supposed to have .GetContactList() is Body.java line 772 which has been commented out for a while. 认为Id分享我发现:经过谷歌搜索,我发现其中解释了Box2D的扩展名由拉libgdx和应该有.GetContactList(文件)是Body.java线772已被注释掉了而。 I don't know why it hasn't been implemented but at least I know why I'm not able to call it. 我不知道为什么它尚未实现,但至少我知道为什么我不能调用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM