API reference
API reference
Select your platform
No SDKs available
No versions available

SurfaceHit Struct

This struct contains the result of a spatial query against an ISurface, such as an ISurface.Raycast(in Ray, out SurfaceHit, float) or a ISurface.ClosestSurfacePoint(in Vector3, out SurfaceHit, float) call.

Properties

Distance : float
[Get][Set]
The distance, in world space, from the origin of the query to the position where the solution was found.
For a raycast, this is the distance from Ray.origin to Point of the result, whereas for a ISurface.ClosestSurfacePoint(in Vector3, out SurfaceHit, float) this is the distance from the first argument to the Point of the result.
Signature
float Oculus.Interaction.Surfaces.SurfaceHit.Distance
Normal : Vector3
[Get][Set]
The normal of the surface, in world space, at the position where the solution to the query was found.
Signature
Vector3 Oculus.Interaction.Surfaces.SurfaceHit.Normal
Point : Vector3
[Get][Set]
The position on the surface, in world space, where the solution to the query was found.
Signature
Vector3 Oculus.Interaction.Surfaces.SurfaceHit.Point