- About XR
- XR Unity SDK
- XR SDK Release Notes
- Version:1.0.3
- Version:1.0.2
- Version:1.0.1
- Version:1.0.0
- Version:0.9.59
- Version:0.9.58
- Version:0.9.57
- Version:0.9.56
- Version:0.9.55
- Version:0.9.54
- Version:0.9.53
- Version:0.9.52
- Version:0.9.51
- Version:0.9.38
- Version:0.9.37
- Version:0.9.34
- Version:0.9.33
- Version:0.9.32
- Version:0.9.31
- Version:0.9.30
- Version:0.9.24
- Version:0.9.23 Beta
API - XRCTLRaycaster¶
Enum¶
public enum RaycasterType
Description
The type of raycaster hitresult.
None |
-1 |
No result. |
UIRaycaster |
0 |
Raycaster HitResult is UIRaycaster. |
ObjectRaycaster |
1 |
Raycaster HitResult is ObjectRaycaster. |
Teleport |
2 |
Raycaster HitResult is Teleport. |
Field¶
public LayerMask BlockMask
Description
Determine the layermask can’t teleport
public float DragThresholdCoeff
Description
Modify the coefficient of drag threshold.
public float DragThresholdMin
Description
Determine the drag threshold minimum value.
public Camera EventCamera
Description
The camera to handle the UI event.
public float FocusDistance
Description
Determine the distance of Focus state.
public bool IgnorePhysicsRaycast
Description
Determine 3D object will recieve IEventSystemHandler or not.
public LayerMask InvalidTerrianMask
Description
Determine the layermask can’t teleport.
public LayerMask ObjectRaycastMask
Description
Determine the layermask which can raycast by ObjectRaycaster.
public LayerMask ObstacleMask
Description
Determine the layermask is obstacle.
public PhysicsRaycaster PhysicsRaycaster
Description
The physic raycaster for hand.
public float RaycastMaxDistance
Description
Determine max distance of ObjectRay.
public float ScrollSensitive
Description
Determine the sensitivity to all scrollable object.
public float ScrollThrehold
Description
Determine the controller moving distance that will start scroll.
public LayerMask UIRaycastMask
Description
Determine the layermask which can raycast by UIRaycast.
public LayerMask ValidTerrianMask
Description
Determine the layermask can teleport.
Propertie¶
public bool CanDrag { get; set; }
Description
Set the property true, will allow this raycaster can trigger drag event.
public float DragThreshold { get; }
Description
Determine the drag threshold.
public float HeadHeight { get; set; }
Description
Determine the head height relative to ground in scene.
public int ObjectRaycaster { get; set; }
Description
The priority of ObjectRaycaster.
public RaycasterType ResultType { get; set; }
Description
Return and set current RaycastType.
public Vector2 ScrollDelta { get; set; }
Description
Return and set the amount of scroll since the last update.
public int Teleport { get; set; }
Description
The priority of Teleport.
public int UIRaycaster { get; set; }
Description
Return and set the priority of UIraycaster.
Event¶
public UnityAction<Vector3 Origin, Vector3 Direction, RaycasterType, RaycastResult> AfterRaycasterEvent
Description
Config the raycast after emitting raycaster.
public UnityAction BeforeRaycasterEvent
Description
Config the raycast before emitting raycaster.
public UnityAction<Vector3 Origin, Vector3 Direction, XRHandlerUtils.TeleportState> TeleportEvent
Description
Callback event of teleport.