开发者

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜