求救,游戏角色在浏览器测试可以到了模拟器和真机就无法移动

onLoad () {

    var self=this;
    self.subPos=cc.p(0,0);
    self.isMoving=false;

    this.nodePos=this.node.getPosition();

    this.node.parent.on(cc.Node.EventType.TOUCH_START,function(event){
        this.isMoving=true;
    },this);
    this.node.parent.on(cc.Node.EventType.TOUCH_MOVE, function(event){
        var touches=event.getTouches();
        //触摸刚开始的位置
        var oldPos = self.node.parent.convertToNodeSpaceAR(touches[0].getStartLocation());
        //触摸时不断变更的位置
        var newPos = self.node.parent.convertToNodeSpaceAR(touches[0].getLocation());
        self.subPos=newPos.sub(oldPos);
        console.log("move");
    }, this);
    this.node.parent.on(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this);
    this.node.parent.on(cc.Node.EventType.TOUCH_CANCEL, this.onTouchCancel, this);

     
},

这是角色移动部分的代码

代码不全吧

cc.Class({
extends: cc.Component,

properties: {
    moveSpeed:500,
    canMove:true,
    
},

// LIFE-CYCLE CALLBACKS:

onLoad () {
    
    var self=this;
    self.subPos=cc.p(0,0);
    self.isMoving=false;

    this.nodePos=this.node.getPosition();

    this.node.parent.on(cc.Node.EventType.TOUCH_START,function(event){
        this.isMoving=true;
    },this);
    this.node.parent.on(cc.Node.EventType.TOUCH_MOVE, function(event){
        var touches=event.getTouches();
        //触摸刚开始的位置
        var oldPos = self.node.parent.convertToNodeSpaceAR(touches[0].getStartLocation());
        //触摸时不断变更的位置
        var newPos = self.node.parent.convertToNodeSpaceAR(touches[0].getLocation());
        self.subPos=newPos.sub(oldPos);
    }, this);
    this.node.parent.on(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this);
    this.node.parent.on(cc.Node.EventType.TOUCH_CANCEL, this.onTouchCancel, this);

     
},


onTouchEnd () {
    this.nodePos = this.node.getPosition(); //获取触摸结束之后的node坐标;
    this.isMoving=false;
},
onTouchCancel: function () {
    this.nodePos = this.node.getPosition(); //获取触摸结束之后的node坐标;
    this.isMoving=false;
},

start () {

},

openMove:function(){
    this.canMove=true;
},
classMove:function(){
    this.canMove=false;
},

update (dt) {
    if(!this.canMove)return;
    if(!this.isMoving)return;
    var oldManPos=this.node.getPosition();
    var direction=cc.pNormalize(this.subPos);
    var newManPos=cc.pAdd(oldManPos,cc.pMult(direction,this.moveSpeed*dt));
    this.node.setPosition(newManPos);
    
    
},

});
这是完整的移动代码

绑定到节点上就能使用,在电脑上用浏览器测试一直都没问题,但是用模拟器时,角色就无法移动了。