游戏开发-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,避免不必要的麻烦

猜你喜欢

转载自www.cnblogs.com/orxx/p/10897151.html