Class SurfaceTouchedEventArgs
An object containing information about a touch on an Immersive Surface. From this you can get information about the Surface the touch was on, the Camera rendering that Surface, the Touch position in Screen Space, Viewport Space and World Space and also information about the objects hit when a ray is cast out from the touch.
Inheritance
System.Object
SurfaceTouchedEventArgs
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: cs.temp.dll.dll
public class SurfaceTouchedEventArgs
Constructors
Declaration
public SurfaceTouchedEventArgs(SwipeInput swipeInput, UnityEngine.Camera renderingCamera, SurfaceLocation surfaceLocation, InputPhase inputPhase, InputType inputType, ImmersiveRaycastHit raycast, GameObject hitUIObject)
Parameters
Declaration
public SurfaceTouchedEventArgs(TapInput tapInput, UnityEngine.Camera renderingCamera, SurfaceLocation surfaceLocation, InputPhase inputPhase, InputType inputType, ImmersiveRaycastHit raycast, GameObject hitUIObject)
Parameters
Properties
Did the touch hit a 2D Collider.
Declaration
public bool DidHit2DCollider { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Did the touch hit a 3D Collider.
Declaration
public bool DidHit3DCollider { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Declaration
public bool DidHitUI { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Declaration
public float DistanceMoved { get; }
Property Value
| Type |
Description |
| System.Single |
|
Declaration
public InputPhase Phase { get; }
Property Value
The Camera which renders to the surface which was touched.
Declaration
public UnityEngine.Camera RenderingCamera { get; }
Property Value
| Type |
Description |
| UnityEngine.Camera |
|
The index of the Camera rendering to the surface which was touched.
Declaration
public int RenderingCameraIndex { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
The screen point in Pixels of the touch.
Declaration
public Vector2 ScreenPoint { get; }
Property Value
The SurfacePosition of the Surface which was touched.
Declaration
public SurfaceLocation TouchedSurfaceLocation { get; }
Property Value
The Index of the touch. -1 if from Mouse.
Declaration
public int TouchId { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
Declaration
public InputType TypeOfInput { get; }
Property Value
The viewport point of the touch. From 0-1.
Declaration
public Vector2 ViewportPosition { get; }
Property Value
Methods
Returns the RaycastHit2D calculated from shooting a ray out from this touch if the Ray hits a 2D Collider.
Declaration
public RaycastHit2D? GetRaycastHit2D()
Returns
| Type |
Description |
| System.Nullable<RaycastHit2D> |
|
Returns the RaycastHit calculated from shooting a ray out from this touch if the Ray hits a 3D Collider.
Declaration
public RaycastHit? GetRaycastHit3D()
Returns
| Type |
Description |
| System.Nullable<RaycastHit> |
|
Declaration
public GameObject GetUiHit()
Returns
| Type |
Description |
| GameObject |
|
Returns the Point in World Space of the touch at the given distance from the Camera.
Declaration
public Vector3 GetWorldPoint(float distanceFromCamera)
Parameters
| Type |
Name |
Description |
| System.Single |
distanceFromCamera |
|
Returns