cocos2d iphone - Box2D mouse Joint issue while dragging. TestPoint function return false -


i'm using box2d mouse joint drag objects i'm stuck in strange issue bodies not responding moved function because

    if (currentfixture->testpoint(worldpoint)) { 

always return false specific bodies.

enter image description here

from above image "yellow" body draggable position centre or bottom of body not top.

note: bodies created using "physiceditor" bodies "b2polygonshape".

edit: bodies without textures... think problem vertex lines intersecting each other.

enter image description here

edit2: using r.u.b.e same result here too.

enter image description here

when bodies have multiple fixtures, need check every fixture:

bool touchingbody( b2body* b, b2vec2 worldpoint )  {     bool bodyistouched = false;     (b2fixture* f = b->getfixturelist(); f; f = f->getnext()) {         if ( bodyistouched = f->testpoint(worldpoint) )             break;     }     return bodyistouched; } 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -