scene.PickFromRay pick failed when the ray is formed by two distant points

Hello, I have some points on the ground, I wan to make a ray between those point and sun position, then detect whether each point can be hit by the sun (whether the sun is blocked), but the result is none, anyone knows the reason?

Hi @WShihan, would you be able to provide a small Sandcastle example demonstrating the issue?

I will also mention that scene.pickFromRay and related functions are currently marked as private. As such we cannot guarantee their usage outside the libraries internals will work as expected and they may change without warning.

You may want to look into some of the IntersectionTests functions we have but I’m not sure any of those would fit your use case directly.

@WShihan I also wanted to add that it sounds like you might be trying to do some visibility/viewshed calculations that the ion-sdk might be equipped for. Specifically the sensor geometries. It is a paid product but take a look and if you’re interested please reach out to our sales team

Hi, thanks for your response, I’m sorry for that I can not provide any code snippets to reproduce the issue.The issue is so weird, because the same code run properly on sandcastle but failed on my computer,and for the latter, if I reverse the origin and direction(make point position as the origin, sun positon as the direction) of the ray, the function pick correctly. I once suspected whether it was the model that caused the issue, so I loaeded same model on sandcastle to test, the function still work well, I have no idea.

The test example is here sandcastle

It’s my first time to hear the SDK, I’ll take a look and make it into consideration, thanks for your recommendation.