[LayaAir 2.0]Laya.Physics.rayCastAll 和 Laya.RaycastHit

这个两个东西
rayCastAll 在文档里能搜索到,但我在射线检测,这么写运行就提示没有该方法
Laya.Physics.rayCastAll(this.ray, this.outHitAllInfo, 30, 0);

RaycastHit 是在创建是时候就报错了
提示没有这个东西。

看官方网站介绍,该勾选的类库我都勾选了,运行还是不行。
已邀请:

赞同来自: kshell

2.0里这个检测方法改了,官网的文档更新有点问题,有些注释和代码没对应上。
 
let scene3d = new Laya.Scene3D();
let outHitInfoAll = new Laya.HitResult();
scene3d.physicsSimulation.rayCastAll(this.ray, outHitInfoAll, depth);

要回复问题请先

商务合作
商务合作