OpenXRAndroidRaycastExtension
Inherits: OpenXRExtensionWrapper
Implements raycasting into the physical environment (using XR_ANDROID_raycast).
Description
Implements raycasting into the physical environment (using XR_ANDROID_raycast).
Depends on OpenXRAndroidTrackablesExtension.
Methods
bool |
is_raycast_supported ( ) const |
raycast ( Array trackable_types, Vector3 origin, Vector3 trajectory, int max_results ) |
Enumerations
enum TrackableType:
TrackableType TRACKABLE_TYPE_PLANE = 0
One of the trackable types that can be provided in raycast, for raycasting real world planes (like ceilings, walls, tables, etc).
For each OpenXRAndroidHitResult returned with this type, OpenXRAndroidHitResult.get_tracker will return a OpenXRAndroidTrackablePlaneTracker.
TrackableType TRACKABLE_TYPE_DEPTH = 1
One of the trackable types that can be provided in raycast, for raycasting any solid real world surface.
For each OpenXRAndroidHitResult returned with this type, OpenXRAndroidHitResult.get_tracker will return null.
Method Descriptions
bool is_raycast_supported ( ) const
Returns true if raycast is supported; otherwise false.
OpenXRAndroidHitResult[] raycast ( Array trackable_types, Vector3 origin, Vector3 trajectory, int max_results )
Performs a raycast against the Array of TrackableTypes, from origin in the direction of trajectory.
Returns an Array of up to max_results OpenXRAndroidHitResults.