ray(through:)
Determines the position and direction of a ray through the given point in the 2D space of the view.
Declaration
@MainActor @preconcurrency func ray(through screenPoint: CGPoint) -> (origin: SIMD3<Float>, direction: SIMD3<Float>)?Parameters
- screenPoint:
A point in the view’s coordinate system.
Return Value
A tuple that represents a ray in AR coordinates that goes from the camera origin through the specified point on the screen.