求救各位大佬,这种 刚体的线性速度 是怎么计算的?
我想根据弓的角度,还有滑动条的力度,来计算“箭”射出去的线性速度(箭是钢体)
现在的计算方法会乱射的
我的代码是这样写的
const V = 1000; // 固定速度
let node = cc.instantiate(this.nodeArrow); //加载箭,添加到弓上
node.rotation = this.node.rotation
node.parent = this.node.parent;
let alpha1 = node.rotation
const v_x = Math.cos(alpha1) * V;
const v_y = Math.sin(alpha1) * V;
node.getComponent(cc.RigidBody).linearVelocity = cc.v2(v_x, v_y);
折磨了好几天了都弄不出,只能来论坛求救大佬们了 
