RenderingConnection.RayCastQueryAsync(RayCast) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Performs a raycast query on the remote scene.
public:
System::Threading::Tasks::Task<Microsoft::Azure::RemoteRendering::RayCastQueryResult ^> ^ RayCastQueryAsync(Microsoft::Azure::RemoteRendering::RayCast cast);
public System.Threading.Tasks.Task<Microsoft.Azure.RemoteRendering.RayCastQueryResult> RayCastQueryAsync (Microsoft.Azure.RemoteRendering.RayCast cast);
member this.RayCastQueryAsync : Microsoft.Azure.RemoteRendering.RayCast -> System.Threading.Tasks.Task<Microsoft.Azure.RemoteRendering.RayCastQueryResult>
Public Function RayCastQueryAsync (cast As RayCast) As Task(Of RayCastQueryResult)
Parameters
- cast
- RayCast
Raycast description.
Returns
Task with return type RayCastQueryResult which holds the array of hit elements. The async will complete during an Update() tick.
Remarks
This call returns immediately and emits an event when the raycast result has arrived. The raycast will be performed on the server against the state of the world on the frame that the raycast was issued on. Results will be sorted by distance, with the closest intersection to the user being the first item in the array.
* A NoConnection error occurs, if there was no connection found.