Click or drag to resize

HitData Structure

An object representing a point hit by a pointer in 3D, 2D or UI space.

Namespace:  TouchScript.Hit
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public struct HitData

The HitData type exposes the following members.

Constructors
  NameDescription
Public methodHitData(RaycastHitUI, TouchLayer, Boolean)
Initializes a new instance of the HitData struct from a UI raycast.
Public methodHitData(RaycastHit, TouchLayer, Boolean)
Initializes a new instance of the HitData struct from a 3D raycast.
Public methodHitData(RaycastHit2D, TouchLayer, Boolean)
Initializes a new instance of the HitData struct from a 2D raycast.
Public methodHitData(Transform, TouchLayer, Boolean)
Initializes a new instance of the HitData struct.
Top
Properties
  NameDescription
Public propertyDistance
Distance to the hit point.
Public propertyLayer
Gets the layer which detected the hit.
Public propertyNormal
Gets the normal at the point in 3D wher eraycast hit the object.
Public propertyPoint
Gets the point in 3D where raycast hit the object.
Public propertyRaycastHit
Gets raycast hit object for a 3D hit.
Public propertyRaycastHit2D
Gets 2D raycast hit object for a 2D hit.
Public propertyRaycastHitUI
Gets raycast hit for a UI hit.
Public propertyScreenSpace
Indicates if this is a Screen Space hit.
Public propertySortingLayer
Sorting layer of the hit target.
Public propertySortingOrder
Sorting order of the hit target.
Public propertyTarget
Gets target Target the hit.
Public propertyType
Gets the type of the hit.
Top
See Also