iphone - Getting contact points on bodies in Cocos2d & Box2d -
i'm new cocos2d , box2d, have been following tutorials , hacking. however, have 1 problem cannot solve.
i create 2 bodies , fixtures (in box2d world) , create "contact listener" object. object stores list of contacts along "contact point".
when 2 bodies collide contact point reported (i think) in world co-ordinate system.
my problem can't seem convert contact point usable co-ordinate on both of bodies.
i want add crack graphic sprite (connected body) @ point of contact on both bodies/fixtures.
has solved this? may storing "contact point" relative "world" wrong way go.
check out this. take @ b2body::getlocalpoint(const b2vec2 &worldpoint)
Comments
Post a Comment