这种用增量的方法使用会有偏移 不知道怎么回事

这种方法很跟手 目前用这种好使
// 注册鼠标移动拖拽事件
this.node.on(Node.EventType.TOUCH_MOVE,(e:EventTouch)=>{
//设置当前物体的世界坐标 为get UI的坐标 因为当前物体是UI层 用本地坐标会偏
this.node.setWorldPosition(e.getUILocation().x, e.getUILocation().y, 0)
})
这种用增量的方法使用会有偏移 不知道怎么回事
这种方法很跟手 目前用这种好使
// 注册鼠标移动拖拽事件
this.node.on(Node.EventType.TOUCH_MOVE,(e:EventTouch)=>{
//设置当前物体的世界坐标 为get UI的坐标 因为当前物体是UI层 用本地坐标会偏
this.node.setWorldPosition(e.getUILocation().x, e.getUILocation().y, 0)
})