[LayaAir 1.0]移动端h5项目如何获取多点触摸的坐标

如何在项目中获取多点触摸的坐标呢?Laya.stage.mouseX是鼠标的坐标,我想知道当前屏幕上所有触摸点的坐标,期待官方的帮助,谢谢。
已邀请:

158*****871

赞同来自:

Laya.stage.on(Event.MOUSE_DOWN, this, this.onMouseDown);
 
 
onMouseDown(e) {
const Event = Laya.Event;
 
// 手机上才有 touches 属性
let touches = e.touches;
 
if (touches && touches.length == 2) {
preRadian = Math.atan2(
touches[0].stageY - touches[1].stageY,
touches[0].stageX - touches[1].stageX);
 
Laya.stage.on(Event.MOUSE_MOVE, this, this.onMouseMove);
}
}

17

赞同来自:

同上,需要同时获取到多个触控点的坐标

要回复问题请先

商务合作
商务合作