<i id='NGeOb'><tr id='NGeOb'><dt id='NGeOb'><q id='NGeOb'><span id='NGeOb'><b id='NGeOb'><form id='NGeOb'><ins id='NGeOb'></ins><ul id='NGeOb'></ul><sub id='NGeOb'></sub></form><legend id='NGeOb'></legend><bdo id='NGeOb'><pre id='NGeOb'><center id='NGeOb'></center></pre></bdo></b><th id='NGeOb'></th></span></q></dt></tr></i><div id='NGeOb'><tfoot id='NGeOb'></tfoot><dl id='NGeOb'><fieldset id='NGeOb'></fieldset></dl></div>

  1. <small id='NGeOb'></small><noframes id='NGeOb'>

    • <bdo id='NGeOb'></bdo><ul id='NGeOb'></ul>
  2. <tfoot id='NGeOb'></tfoot>

    <legend id='NGeOb'><style id='NGeOb'><dir id='NGeOb'><q id='NGeOb'></q></dir></style></legend>

    1. 在 Cocos2d &amp; 中获取身体的接触点Box2d

      Getting contact points on bodies in Cocos2d amp; Box2d(在 Cocos2d amp; 中获取身体的接触点Box2d)

        <small id='Tek0I'></small><noframes id='Tek0I'>

      • <tfoot id='Tek0I'></tfoot>
        <legend id='Tek0I'><style id='Tek0I'><dir id='Tek0I'><q id='Tek0I'></q></dir></style></legend>
          <bdo id='Tek0I'></bdo><ul id='Tek0I'></ul>
            <tbody id='Tek0I'></tbody>
          <i id='Tek0I'><tr id='Tek0I'><dt id='Tek0I'><q id='Tek0I'><span id='Tek0I'><b id='Tek0I'><form id='Tek0I'><ins id='Tek0I'></ins><ul id='Tek0I'></ul><sub id='Tek0I'></sub></form><legend id='Tek0I'></legend><bdo id='Tek0I'><pre id='Tek0I'><center id='Tek0I'></center></pre></bdo></b><th id='Tek0I'></th></span></q></dt></tr></i><div id='Tek0I'><tfoot id='Tek0I'></tfoot><dl id='Tek0I'><fieldset id='Tek0I'></fieldset></dl></div>

                本文介绍了在 Cocos2d &amp; 中获取身体的接触点Box2d的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我对 Cocos2d 和 Box2d 非常,我一直在关注教程和一般是黑客攻击.不过,我有一个我无法解决的问题.

                I'm very new to Cocos2d and Box2d, I have been following tutorials and generally hacking. However, I have one problem I cannot solve.

                我创建了 2 个物体和固定装置(在 Box2d 世界中)并创建了一个Contact Listener"对象.此对象存储联系人列表以及联系人".

                I create 2 bodies and fixtures (in the Box2d world) and create a "Contact Listener" object. This object stores a list of contacts along with the "contact point".

                当两个物体发生碰撞时,会报告一个接触点,但这(我认为)是在世界坐标系中.

                When the two bodies collide a contact point is reported but this (I think) is in the world co-ordinate system.

                我的问题是我似乎无法将接触点转换为两个身体上的可用坐标.

                My problem is I can't seem to convert the contact point to a usable co-ordinate on both of the bodies.

                我想在精灵(连接到身体)在双方的联络点身体/固定装置.

                I want to add a crack graphic to the sprite (connected to the body) at the point of contact on both bodies/fixtures.

                有人解决了吗?我可能存储相对于世界"的接触点"是完全错误的方式.

                Has anyone solved this? I may be storing the "contact point" relative to the "world" is completely the wrong way to go.

                推荐答案

                查看 这个.看看 b2Body::GetLocalPoint(const b2Vec2 &worldPoint)

                这篇关于在 Cocos2d &amp; 中获取身体的接触点Box2d的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Hardware Volume buttons change in app volume(硬件音量按钮更改应用程序音量)
                Cocos2d - How to check for Intersection between objects in different layers(Cocos2d - 如何检查不同层中对象之间的交集)
                Highlight Read-Along Text (in a storybook type app for iPhone)(突出显示朗读文本(在 iPhone 的故事书类型应用程序中))
                Cocos2D + Disabling only Retina iPad Graphics(Cocos2D + 仅禁用 Retina iPad 图形)
                Proper cocos2d scene restart?(正确的 cocos2d 场景重启?)
                [ios.cocos2d+box2d]how to disable auto-rotation?([ios.cocos2d+box2d]如何禁用自动旋转?)
              1. <small id='2UVQO'></small><noframes id='2UVQO'>

                    <tbody id='2UVQO'></tbody>

                    • <bdo id='2UVQO'></bdo><ul id='2UVQO'></ul>

                        <i id='2UVQO'><tr id='2UVQO'><dt id='2UVQO'><q id='2UVQO'><span id='2UVQO'><b id='2UVQO'><form id='2UVQO'><ins id='2UVQO'></ins><ul id='2UVQO'></ul><sub id='2UVQO'></sub></form><legend id='2UVQO'></legend><bdo id='2UVQO'><pre id='2UVQO'><center id='2UVQO'></center></pre></bdo></b><th id='2UVQO'></th></span></q></dt></tr></i><div id='2UVQO'><tfoot id='2UVQO'></tfoot><dl id='2UVQO'><fieldset id='2UVQO'></fieldset></dl></div>
                          <legend id='2UVQO'><style id='2UVQO'><dir id='2UVQO'><q id='2UVQO'></q></dir></style></legend>

                          <tfoot id='2UVQO'></tfoot>