HitTestResult
class HitTestResult
Defines an intersection between a ray and the scene.
This can be obtained by running hitTest or hitTestAsync on an ActivityPose
.
Summary
Nested types |
---|
object HitTestResult.SurfaceType |
Public constructors |
---|
HitTestResult( |
Public properties |
|
---|---|
Float |
the distance from the origin to the hit location. |
Vector3? |
the |
Vector3? |
The normal of the surface of the entity that was hit. |
Int |
the HitTestSurfaceType that was hit. |
Public constructors
HitTestResult
HitTestResult(
hitPosition: Vector3?,
surfaceNormal: Vector3?,
surfaceType: Int,
distance: Float
)
Public functions
Public properties
distance
val distance: Float
the distance from the origin to the hit location. If nothing was hit the distance will be POSITIVE_INFINITY.
hitPosition
val hitPosition: Vector3?
the Vector3
position of the intersection between a ray and the Scene. This will be null if nothing was hit
surfaceNormal
val surfaceNormal: Vector3?
The normal of the surface of the entity that was hit. This will be null if nothing was hit