1. 两个点 组成的直线 相对于水平的斜率 let startPos let endPos let dt = cc.pSub(startPos, endPos); //计算角度 let radian = Math.atan2(dt.x, dt.y);