Scene.multiPickWithRay returns null ray

When I cast a ray using the function scene.multiPickWithRay the elements in the resulting PickingInfo[] array all have ray property set to null.
I wanted to create a PR right away to fix it but as I investigated the function → it goes all the way down to the mesh.intersects method which sets almost all properties of the PickingInfo object but skips the ray too and here it seems on purpose.

So now I’m not sure - is it null on purpose and are there some related conditions/side effects to it? Or is it simply forgotten - in which case where would be the best place to fix it?

Thank you.

maybe related:

PickSpriteWithRay returns ray value as null

Hi!

It’s probably not intentional :slight_smile:
From quickly looking aqt the code, this can be added to the _internalMultiPick function in ray.ts, but I didn’t dig too much into it. If you want to submit a PR we will be more than happy to review it.

Isnt the ray passed to the function anyway ?

not to the callback, i understand if someone wans it defined