游戏开发-cocos creator踩坑-多边形检测cc.Intersection.pointInPolygon

let check_node_collider = check_node.getComponent(cc.PolygonCollider);
这里check_node_collider的point属性获取的是局部坐标,在使用cc.Intersection.pointInPolygon做判断时,最好统一采用世界坐标
check_node_collider.world.points,避免不必要的麻烦
posted @ 2019-05-20 23:00  orxx  阅读(2892)  评论(0编辑  收藏  举报