Instance Method


Determines the position and direction of a ray through the given point in the 2D space of the view.


func ray(through screenPoint: CGPoint) -> (origin: SIMD3<Float>, direction: SIMD3<Float>)?



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.

See Also

Mapping Between Coordinate Spaces

func project(SIMD3<Float>) -> CGPoint?

Projects a point from the 3D world coordinate system of the scene to the 2D pixel coordinate system of the view.

func unproject(CGPoint, ontoPlane: float4x4) -> SIMD3<Float>?

Maps a 2D point from the view’s coordinate system onto the given plane in 3D space.

func unproject(CGPoint, viewport: CGRect) -> SIMD3<Float>?

Maps a 2D point from the pixel coordinate system of a viewport into a 3D coordinate space.