使用cocos creator 3d v1.1.0 写双指触摸,ios 微信扫一扫可以实现,安卓微信内置浏览器不能实现双指。萌新求助各位大佬
public onLoad() {
cc.systemEvent.on(cc.SystemEvent.EventType.TOUCH_START, this.onTouchStart, this);
}
public onTouchStart(t: Touch, e: EventTouch) {
var touches = e.getTouches();
this.lable.string += touches.length;
for (let i = 0; i < touches.length; i++) {
var pos = new cc.Node("touch" + i)
var text = pos.addComponent(cc.Label);
}
if (touches.length == 1) {
// 一根手指是移动,这里不用写任何代码
}
else if (touches.length == 2) {
}
}