XRSPACE Developer Console

API - XRBaseRaycaster

User can create raycaster by inheritan this class.

Contents

Propertie

  • public virtual Vector3 Direction { get; set; }

Description Virtual vector3 variable. Usually use this to store raycast direction.


  • public virtual bool IsDrag { get; set; }

Description Virtual boolean variable. Input module will use this property to recognize whether this raycaster is dragging.


  • public virtual bool IsFocus { get; set; }

Description Virtual boolean variable. Input module will use this property to recognize whether this raycaster is focusing.


  • public virtual bool IsPress { get; set; }

Description Virtual boolean variable. Input module will use this property to recognize whether this raycaster is pressing.


  • public virtual Vector3 Origin { get; set; }

Description Usually use this to store raycast origin.


  • public virtual bool UseRaycast { get; set; }

Description Virtual boolean variable. Determine whether the raycaster should be process or not by input module.

Method

  • public RaycasterResult HitResult

Description RaycasterResult. Unity class, can use this to store result of raycast.


  • public abstract RaycastResult Raycast(XRPointerEventData eventData)

Description Abstract function. The function will process by input module and return RaycastResult to input module.