低版本创建的工程,用了物理引擎,1.7说修复了这个问题,我升级到1.7还是有这问题,现在升级1.8了,还是报错,为什么?
我用的mac版ccc开发的。
有开发团队的帮忙看一下吗,
Windows版本的1.8也报错。
我卡在这了。这个问题到底是没修复还是我没弄好,有知道的能说一下嘛?
代码
checkArea1 = cc.rect(startP.x - w, startP.y + h, w, h);
console.log(checkArea1);
var colliderList1 = cc.director.getPhysicsManager().testAABB(checkArea1);
console.log(colliderList1);
log
Rect {x: 760.8400198070406, y: 160, width: 160, height: 120}
Uncaught TypeError: Cannot read property ‘x’ of undefined
at PhysicsAABBQueryCallback.167.PhysicsAABBQueryCallback.init (CCPhysicsAABBQueryCallback.js:8)
at CCClass.testAABB (CCPhysicsManager.js:246)
at Object.hasDanger (AIUtil.js:161)
at Object.isSuitableMove (AIUtil.js:48)
at Object.getSuitableMoveDirection (AIUtil.js:16)
at TankScript.suitbaleMove (TankScript.js? [sm]:117)
at TankScript. (TankScript.js? [sm]:55)
at CallbackTimer.42.proto.trigger (CCScheduler.js:245)
at CallbackTimer.42.proto.update (CCScheduler.js:218)
at TheClass.update (CCScheduler.js:429)