可以尝试一下,打开laya.physics.js
搜索
box2d.b2BroadPhase.prototype.UnBufferMove
找到
box2d.b2BroadPhase.prototype.UnBufferMove = function(a) {
a = this.m_moveBuffer.indexOf(a);
this.m_moveBuffer[a] = null
}
;
替换为:
box2d.b2BroadPhase.prototype.UnBufferMove = function(a) {
let ba=0;
while(true){
ba = this.m_moveBuffer.indexOf(a,ba);
if(ba<0)break;
this.m_moveBuffer[ba] = null
}
}
;