How to configure raycasting to stop at a specified distance

Hi,

I would like to know if there currently exists a way to stop the ray casting a specified distance.

I found PickConfig — HOOPS Communicator Documentation
and was wondering if it is the correct property to use for this.

for example:

const pickConfig = new Communicator.PickConfig(Communicator.SelectionMask.Face);
pickConfig.maxWorldDistance = 2000;

would ignore computation of any intersections that are further away than 2000 mm along the ray’s vector

Thank you

1 Like

Hello @francois.sunatori,

Yes, you are correct – PickConfig.maxWorldDistance is the setting that limits the selection range of the ray. Just wanted to mention that the distance is measured in world-space units and not necessarily in an actual unit of measurement (for example, millimeters).

Thanks,
Tino

1 Like