开发者

Changing the detection on a cocos2d sprite

开发者 https://www.devze.com 2023-02-08 03:31 出处:网络
I have a sprite using spriteWithFile. I have collision detection on this sprite which currently only detects开发者_运维问答 on the middle of the image. The middle of the image is currently detecting

I have a sprite using spriteWithFile.

I have collision detection on this sprite which currently only detects开发者_运维问答 on the middle of the image. The middle of the image is currently detecting collision, so half half the image will be over the collision point when the detection is made.

How do I change this detection point on the character sprite?

Thanks


What about using some physics engine? Box2D for example. It's coming with cocos2d, it's fast, it's easy to use.

0

精彩评论

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