Cocos2d iPhone Non-Rectangular Sprite Touch Detection

前端 未结 3 559
Happy的楠姐
Happy的楠姐 2021-02-11 06:32

Have a project with a TRIANGLE shaped graphic in a sprite. I am arranging these sprites in a grid so that their rectangles are all overlapping. As sprites get touched their z-or

3条回答
  •  名媛妹妹
    2021-02-11 06:47

    I have seen several tile editor tools out there including the one offered by the developer of Cocos2D that allows you to use a bezier curve in order to directly outline the exact image versus the rect. When using with Box2D Physics this seems super simple as per the video tutorials and examples I saw on the Cocos2D site and youtube. Google Tile or Map Editor and Cocos2d on youtube it should show you a few tools you could use and there would not be any need to program any complicated geometric collision - should be WYSIWYG.

    Cheers,

    Matthew

提交回复
热议问题