this.x = lerpDistance(mx, this.x, 0.9);
this.y = lerpDistance(my, this.y, 0.9);
var deltaY = my - this.y;
var deltaX = mx - this.x;
var beta = Math.atan2(deltaY,deltaX);
this.angle = lerpAngle(beta, this.angle, 0.9);
ctx1.save();
ctx1.translate(this.x,this.y);
ctx1.rotate(this.angle);
ctx1.drawImage(this.bigEye,-this.bigEye.width * 0.5,-this.bigEye.height * 0.5);
ctx1.drawImage(this.bigBody,-this.bigBody.width * 0.5,-this.bigBody.height * 0.5);
ctx1.drawImage(this.bigTail,-this.bigTail.width * 0.5 + 30,-this.bigTail.height * 0.5);
ctx1.restore();
也就是说你的角度没有设置,请在 this.angle变量之后+ Math.PI
this.angle = lerpAngle(beta, this.angle, 0.9) + Math.PI
太巧了 咱俩的问题一模一样 想问问 为什么 照着 视频写的啊
好的解决了,谢谢
还是有问题,会出现两个不同角度的大鱼的身体