Show / Hide Table of Contents

    UUxtFarPointerComponent

    Component that casts a ray for the given hand-tracked hand and raises far interaction events on the far targets hit. A far target is an actor or component implementing the UUxtFarTarget interface.

    class UUxtFarPointerComponent;
    

    Header

    #include <Input/UxtFarPointerComponent.h>

    Inheritance

    Inherits from UUxtPointerComponent, UActorComponent

    Public Functions

    Name
    UUxtFarPointerComponent()
    FVector GetPointerOrigin() const
    FQuat GetPointerOrientation() const
    FVector GetRayStart() const
    UPrimitiveComponent * GetHitPrimitive() const
    FVector GetHitPoint() const
    FVector GetHitNormal() const
    bool IsPressed() const
    bool IsEnabled() const
    virtual void SetActive(bool bNewActive, bool bReset =false) override
    virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction * ThisTickFunction) override
    virtual void SetFocusLocked(bool bLocked) override
    virtual UObject * GetFocusTarget() const override
    virtual FTransform GetCursorTransform() const override

    Public Attributes

    Name
    TEnumAsByte< ECollisionChannel > TraceChannel
    float RayStartOffset
    float RayLength
    FUxtFarPointerEnabledDelegate OnFarPointerEnabled
    FUxtFarPointerDisabledDelegate OnFarPointerDisabled

    Additional inherited members

    Public Functions inherited from UUxtPointerComponent

    Name
    UUxtPointerComponent() =default
    bool GetFocusLocked() const

    Public Attributes inherited from UUxtPointerComponent

    Name
    EControllerHand Hand

    Protected Attributes inherited from UUxtPointerComponent

    Name
    bool bFocusLocked

    Public Functions Documentation

    function UUxtFarPointerComponent

    UUxtFarPointerComponent()
    

    function GetPointerOrigin

    FVector GetPointerOrigin() const
    

    Origin of the pointer ray as reported by the hand tracker. See GetRayStart() for actual start of the ray used for querying the scene.

    function GetPointerOrientation

    FQuat GetPointerOrientation() const
    

    Orientation of the pointer ray.

    function GetRayStart

    FVector GetRayStart() const
    

    Start of the ray used for querying the scene. This is the pointer origin shifted by the ray start offset in the pointer forward direction.

    function GetHitPrimitive

    UPrimitiveComponent * GetHitPrimitive() const
    

    Primitive the pointer is currently hitting or null if none.

    function GetHitPoint

    FVector GetHitPoint() const
    

    Current hit point location or ray end if there's no hit.

    function GetHitNormal

    FVector GetHitNormal() const
    

    Current hit point normal or negative ray direction if there's no hit.

    function IsPressed

    bool IsPressed() const
    

    Whether the pointer is currently pressed.

    function IsEnabled

    bool IsEnabled() const
    

    Whether the pointer is currently enabled. Hit information is only valid while the pointer is enabled.

    function SetActive

    virtual void SetActive(
        bool bNewActive,
        bool bReset =false
    ) override
    

    function TickComponent

    virtual void TickComponent(
        float DeltaTime,
        ELevelTick TickType,
        FActorComponentTickFunction * ThisTickFunction
    ) override
    

    function SetFocusLocked

    virtual void SetFocusLocked(
        bool bLocked
    ) override
    

    Reimplements: UUxtPointerComponent::SetFocusLocked

    Set the lock state of the pointer. Locked pointers don't update their hit, remaining focused on the primitive they were hitting until unlocked.

    function GetFocusTarget

    virtual UObject * GetFocusTarget() const override
    

    function GetCursorTransform

    virtual FTransform GetCursorTransform() const override
    

    Public Attributes Documentation

    variable TraceChannel

    TEnumAsByte< ECollisionChannel > TraceChannel = ECollisionChannel::ECC_Visibility;
    

    Trace channel to be used in the pointer's line trace query.

    variable RayStartOffset

    float RayStartOffset = 5;
    

    Start of the pointer ray expressed as an offset from the hand ray origin in the ray direction.

    variable RayLength

    float RayLength = 500;
    

    Pointer ray length from ray start.

    variable OnFarPointerEnabled

    FUxtFarPointerEnabledDelegate OnFarPointerEnabled;
    

    variable OnFarPointerDisabled

    FUxtFarPointerDisabledDelegate OnFarPointerDisabled;
    

    Updated on 2 November 2021 at 11:40:26 Coordinated Universal Time

    • Improve this Doc
    Back to top Generated by DocFX