cc.rectContainsPoint使用中发现的问题

cc.rectContainsPoint(rect, point);
此中rect常用node.getBoundingBox()方法取得,而这个方法通过node的x,y和width,height算得。也就带来了此中rect常用node和point在不同parent下时,坐标系不同。当使用时,应统一坐标系或将point换算为node的坐标系。
posted @ 2019-11-25 14:38  流星曳尾  阅读(1258)  评论(0)    收藏  举报