先感谢之前帮忙做调的几位大神 ~
现在旋转很奇怪~还是来求助了!
在飞机飞行时,我记录上一帧的坐标,再通过当前帧的坐标求向量夹角,但不知道为什么就是不对~而且与C++的不同,求夹角时需要传入另一个vec2
Rotation_function:function(){
this.currentP = this.node.position;
var rotationAngle = this.currentP.angle(this.lastP) / Math.PI * 360;
this.node.rotation = rotationAngle;
// console.log(rotationAngle);
this.lastP = this.currentP;
// console.log(this.currentP);
},
求大神 帮忙