[LayaAir 2.0]3D射线碰撞总是会穿墙,求解决方法

this.ray = new Laya.Ray(new Laya.Vector3(0, 0, 0), new Laya.Vector3(0, 0, 0));
this.scene.physi*Simulation.rayCast(this.ray, this.outHitInfo, 1)
角色侧面进入碰撞this.outHitInfo没有碰撞信息,正面进入碰撞才有

this.capsuleCollider = new Laya.CapsuleColliderShape(0.25, 0.85);
this.from = new Laya.Vector3(this.player.tran*orm.position.x, this.player.tran*orm.position.y + 1.5, this.player.tran*orm.position.z + 2);
this.to = new Laya.Vector3(this.player.tran*orm.position.x, this.player.tran*orm.position.y + 1.5, this.player.tran*orm.position.z - 1);
this.scene.physi*Simulation.shapeCast(this.capsuleCollider, this.from, this.to, this.outHitInfo);
碰撞一次之后this.outHitInfo.succeeded一直为true;
已邀请:

小小泽

赞同来自:

可以的话请提交一个可以复现的demo。只看这一段代码不太好确定问题

要回复问题请先

商务合作
商务合作