onCollisionEnter: function (other,self){
if(other.node.tag=='2'){
other.node.gameStatic.poolManage.recycleObj(4,other.node);
this.node.Reset();
console.log(this.node);
}
为什么这样写的碰撞检测,检测不出来 该脚本是挂在player脚本上的
onCollisionEnter: function (other,self){
if(other.node.tag=='2'){
other.node.gameStatic.poolManage.recycleObj(4,other.node);
this.node.Reset();
console.log(this.node);
}
为什么这样写的碰撞检测,检测不出来 该脚本是挂在player脚本上的
提供个小demo,帮你看看。
萌新一脸懵逼 弱弱的问一句demo是什么
也就是把子弹还有还有障碍物都放回对象池
子弹加碰撞器了吗 物体加了吗 碰撞分组了吗
关注一下,我也遇到这个麻烦的问题了,都加了碰撞器,也分了组,还没找到原因
在脚本里开启碰撞了吗?
开启了,我的问题解决了,我是分组时给错节点了,应该给根节点修改group属性值。
如果用tag值去碰撞检测还需要分组吗
不太清楚,如何用tag值做碰撞检测?不应该是按碰撞框做检测吗?
示例啊,能复现你说的问题的示例
是不是应该写成other.tag == 2,可以打印下other节点看看信息
stoneInint里面
this.setJumoAction() = this.jumpAction;不能这样写的好像