Finding Contact point - Box2d with Cocos2d
I'm building a game with Cocos2d + Box2d
I want my hero's jump direction to be orthogonal to the ground he is standing on.
My idea is that I use a vector from开发者_JS百科 the contact point (hero with ground) to the Center of the Hero Sprite. Then I use an impulse to make the hero jump.
Has anyone an idea how I could do this? How can I find out the contact point?
精彩评论