private onMouseDown(e: Event): void {
var touches: Array<any> = e.touches;
if (touches && touches.length == 2) {
this.preRadian = Math.atan2(
touches[0].stageY - touches[1].stageY,
touches[0].stageX - touches[1].stageX);
Laya.stage.on(Event.MOUSE_MOVE, this, this.onMouseMove);
}
}
private onMouseMove(e: Event): void {
var touches: Array<any> = e.touches;
if (touches && touches.length == 2)
{
var nowRadian: number = Math.atan2(
touches[0].stageY - touches[1].stageY,
touches[0].stageX - touches[1].stageX);
this.sp.rotation += 180 / Math.PI * (nowRadian - this.preRadian);
length==2就是两根手指, 把他改成你想要的数量不久可以了么,他不是根据mousex,y;而是根据 touches[0].stageY - touches[1].stageY,