'ARKit – Raycasting using a world ray instead of a screen point

I want to achieve something similar like ARCore's raycast method which takes an arbitrary ray in world space coordinates instead of a screen-space point:

List<HitResult> hitTest (float[] origin3, int originOffset, float[] direction3, int directionOffset)

I see ARKit itself has not that method like that, but in any way maybe someone has an idea!

Thanks.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source