[LayaAirIDE 2.0]预制体添加刚体后,和其它刚体碰撞后不能修改角度和位置

 onTriggerEnter(other,self,contact)
    {
        var n=this.owner.rotation;
        if(other.label === "heng"){
            console.log("角度"+this.owner.rotation);
            this.owner.rotation=180-n;
            console.log("角度"+this.owner.rotation);
        } 
        if(other.label === "shu"){
            console.log("角度"+this.owner.rotation);
            this.owner.rotation=-n;
            console.log("角度"+this.owner.rotation);
        }  
    }
 
一用这个方法修改角度就不知道预制体跑到哪里去了
微信截图_20200817132845.png 微信截图_20200817132919.png
已邀请:

Laya_z

赞同来自:

麻烦提供一个Demo吧,这样方便我们来看问题

要回复问题请先

商务合作
商务合作