Hey @Dad72 - Sorry I missed your question the first time!
Yes you are absolutely correct! Two different methods of achieving the same result! So what to use?
This would definitely be one of those moments where I get out of my depth VERY quickly, so we should definitely bring @Deltakosh into this conversation as he can correct anything that I’m not portraying correctly.
So which one to use? I believe there are 2 main differences between the two methods. The amount of math being calculated under the hood for you, and the ability to multi pick objects. For the ray method, there is math that needs to take the world matrix into account in order to cast the ray out into space. Additionally there is math needed to convert the pointer’s 2D coordinates into a direction for the ray to be cast.
I believe the evt.pickInfo option has less calculation that’s being done to achieve the result because I don’t THINK it has the same world matrix math involved. That being said, I absolutely defer to @Deltakosh to confirm or deny that statement. LOL
So on the surface I would guess that evt.pickInfo would be less expensive operationally.
So why use the pickWithRay method? In general, picking with rays allows you to detect collision with multiple objects instead of just one.
While I haven’t tried this specifically with the createPickingRay, I believe it’s the main advantage to use rays as a means of selection.
Again, I want to caveat that I am by no means the expert, so apologies if I get this wrong, but I hope this is helpful.