关于节点跟随手指触摸加倍移动的问题

问题描述:
通过event.getDeltaX()和event.getDeltaY()获得物体的移动偏移量,然后重新设置物体的position。
这个方法在浏览器里执行正常,手指移动多少,物体就移动多少;在手机上就不正常了,随着手指移动距离的增加,物体会成倍的移动,而且移动距离越长,物体移动的距离就越远;这是啥原因呢?

this.node.on(Node.EventType.TOUCH_MOVE, (event:EventTouch)=>{
let position = this.node.getPosition();
this.node.setPosition(position.x+event.getDeltaX(),position.y+event.getDeltaY());
}, this);

版本:3.8.2

使用 getUIxxxx 系列的 API

2赞

感谢kuokuo大神的指点,确实好了。我再看看getDelta()与getUIDelta()有啥区别