Performs a convex ray cast against all the geometry in the scene for a ray of a given origin, direction, and length.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- Xcode 11.0+
The origin of the ray relative to
The direction of the ray relative to
The length of the ray relative to
A query type.
A collision mask that you can use to prevent collisions with certain objects.
An entity that defines the frame of reference. The method returns results relative to this entity. Set to
nilto use the world space origin
(0, 0, 0).
An array of collision cast hit results. Each hit indicates where the ray, starting at a given point and traveling in a given direction, hit a particular entity in the scene.
The method ignores entities that lack a