- 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 - XRHandRaycaster¶
Enum¶
public enum RaycasterType
Description
The type of raycaster hitresult.
None |
-1 |
No result. |
UITouch |
0 |
Raycaster HitResult is UITouch. |
UIRaycaster |
1 |
Raycaster HitResult is UIRaycaster. |
ObjectRaycaster |
2 |
Raycaster HitResult is ObjectRaycaster. |
Teleport |
3 |
Raycaster HitResult is Teleport. |
Field¶
public LayerMask BlockMask
Description
Determine the layermask can’t teleport
public float CastRadius
Description
Determine the raycaster’s radius. (The raycaster is ellipsoidal.)
public float DragScaleCoeff
Description
Scaling of drag distance.
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 FlexibleAngle
Description
Determine the flexible space which can let user keep teleport to farthest place when the angle of user’s hand and body is max.
public float FocusDis
Description
Determine the distance of Focus state.
public CapsuleCollider HandCollider
Description
The collider on hand control by raycaster.
public Transform Head
Description
Current Head Transform.
public bool IgnorePhysicsRaycast
Description
Determine 3D object will recieve IEventSystemHandler or not.
public Transform IndexPoint
Description
The transform of index finger relative to plam’s position.
public LayerMask InvalidTerrianMask
Description
Determine the layermask can’t teleport.
public Transform Knuckle
Description
The transform of current middle finger’s knuckle transform.
public public float MaxAngle
Description
Determine the angle of hand and head which make teleport to max distance.
public public float MinAngle
Description
Determine the angle of hand and head which make teleport to min distance.
public LayerMask ObjectMask
Description
Determine the layermask which can raycast by ObjectRaycaster.
public float ObjectRayMaxDistance
Description
Determine max distance of ObjectRay.
public LayerMask ObstacleMask
Description
Determine the layermask is obstacle.
public PhysicsRaycaster PhysicsRaycaster
Description
The physic raycaster for hand.
public XRHandlerUtils.RaycasterSide RaycasterSide
Description
Represent the hand side of raycast.
public float TouchColliderRadius
Description
Determine the radius of tocuh collider.
public public float TPMaxDistance
Description
Determine the max distance of teleport.
public LayerMask UIRaycastMask
Description
Determine the layermask which can raycast by UIRaycast.
public LayerMask UITouchMask
Description
Determine the layermask which can raycast by UITouch.
public LayerMask ValidTerrianMask
Description
Determine the layermask can teleport.
Propertie¶
public bool CanDrag { get; set; }
Description
Specify hand can check dragging.
public float DragThreshold { get; }
Description
The threshold how much your hand move will trigger drag event.
public float FollowingDis { get; set; }
Description
Raycsater will fallow the stable point when knuckle move over the current distance. More detail description, please vivst Component - XRHandRaycaster.
public float HeadDownwardOffset { get; set; }
Description
Return and set the pivot offset relative to head y axis.
public float HeadHeight { get; set; }
Description
Determine the head height relative to ground in scene.
public float HeadSideOffset { get; set; }
Description
Return and set the pivot offset relative to head z axis.
public float HorizonWeight
Description
The horizon move weight of stable point and knuckle blending result.
public int ObjectRaycaster { get; set; }
Description
The priority of ObjectRaycaster.
public RaycasterType ResultType { get; set; }
Description
Current RaycastType.
public int Teleport { get; set; }
Description
The priority of Teleport.
public int UIRaycaster { get; set; }
Description
The priority of UIraycaster.
public int UITouch { get; set; }
Description
The priority of UITouch.
public float VerticleWeight
Description
The verticle move weight of stable point and knuckle blending result.
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.