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

The position on the surface, in world space, where the solution to the query was found.
The normal of the surface, in world space, at the position where the solution to the query was found.
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.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon