[LayaAir 2.0]2d物理引擎中,onTriggerEnter函数中的contact参数的getHitInfo函数无效

此处应该改为
微信截图_20200708181058.png
已邀请:

176*****795

赞同来自:

contack.getHitInfo = function () {
这一行上面 写 let that = this; 把this保存下来,
然后把 var mainfold = new Physics.I.box2d.b2WorldMainfol(); 改为
var mainfold = new that.box2d.b2WorldMainfol();

要回复问题请先

商务合作
商务合作