我在函数里有用到rotation属性,为什么在第二次调用才会报标题这样的错的?
我的代码: this.newgan1=cc.instantiate(this.gan);
this.node.addChild(this.this.newgan1);
this.newgan1.setPosition(cc.p(px,py));
this.newgan1.rotation=oldgan.rotation+angle;
我在函数里有用到rotation属性,为什么在第二次调用才会报标题这样的错的?
我的代码: this.newgan1=cc.instantiate(this.gan);
this.node.addChild(this.this.newgan1);
this.newgan1.setPosition(cc.p(px,py));
this.newgan1.rotation=oldgan.rotation+angle;
有没有单独修改rotationX或rotationY的地方
因为第二次调用才出现 rotationX 和 rotationY 不符的情况
团队大大,你要说到点上啊,听不懂哦
这个错误很明显啊,x 轴 rotation 和 y 轴 rotation 不一致,所以无法返回 getRotation 的结果
没有,全程都是用rotation
可是第一次调用这个是没问题的,那这个我要怎么改
那我要怎么改呢,因为这个我是要多次调用的
检查一下有没有单独修改rotationX或rotationY的地方
没有的呢
请问解决了吗?我也遇到了相同的问题。
找一下跳訊息的那個prefab 使用文字編輯器打開 搜尋rotation找 rotationX rotationY 的值是否不同 改成相同就解決了