Class UUxtGrabTargetComponent
Interactable component that listens to grab events from near pointers.
A pointer that starts grabing while near the actor is considered a grabbing pointer. The grab is released when the pointer stops grabing, regardless of whether it is still near or not.
The GrabComponent does not react to grabbing pointers by itself, but serves as a base class for manipulation.
Inheritance
System::Object
USceneComponent
UUxtGrabTargetComponent
Namespace:
Assembly: .dll
Syntax
public: class UUxtGrabTargetComponent : public xtGrabTarget, public xtFarTarget
Constructors
|
Improve this Doc
View Source
UUxtGrabTargetComponent()
Declaration
public: UUxtGrabTargetComponent()
Fields
|
Improve this Doc
View Source
InteractionMode
Property that indicates if the object is grabbable with far or near interaction or both.
Declaration
public: int32 InteractionMode
Field Value
|
Improve this Doc
View Source
OnBeginGrab
Event raised when grab starts.
Declaration
public: FUxtBeginGrabDelegate OnBeginGrab
Field Value
Type |
Description |
FUxtBeginGrabDelegate |
|
|
Improve this Doc
View Source
OnEndGrab
Event raised when grab ends.
Declaration
public: FUxtEndGrabDelegate OnEndGrab
Field Value
Type |
Description |
FUxtEndGrabDelegate |
|
|
Improve this Doc
View Source
OnEnterGrabFocus
Event raised when entering grab focus.
Declaration
public: FUxtEnterGrabFocusDelegate OnEnterGrabFocus
Field Value
Type |
Description |
FUxtEnterGrabFocusDelegate |
|
|
Improve this Doc
View Source
OnExitGrabFocus
Event raised when exiting grab.
Declaration
public: FUxtExitGrabFocusDelegate OnExitGrabFocus
Field Value
Type |
Description |
FUxtExitGrabFocusDelegate |
|
|
Improve this Doc
View Source
OnUpdateGrab
Event raised when grab updates.
Declaration
public: FUxtUpdateGrabDelegate OnUpdateGrab
Field Value
Type |
Description |
FUxtUpdateGrabDelegate |
|
|
Improve this Doc
View Source
OnUpdateGrabFocus
Event raised when grab focus updates.
Declaration
public: FUxtUpdateGrabFocusDelegate OnUpdateGrabFocus
Field Value
Type |
Description |
FUxtUpdateGrabFocusDelegate |
|
Methods
|
Improve this Doc
View Source
BeginPlay()
Declaration
protected: virtual void BeginPlay() override
|
Improve this Doc
View Source
FindGrabPointer(UUxtNearPointerComponent *NearPointer, UUxtFarPointerComponent *FarPointer, bool &Success, FUxtGrabPointerData &PointerData, int &Index)
Returns true if the pointer is currently grabbing the actor. PointerData will contain the associated grab data for the pointer. Index is the order in which pointers started grabbing.
Declaration
public: void FindGrabPointer(UUxtNearPointerComponent *NearPointer, UUxtFarPointerComponent *FarPointer, bool &Success, FUxtGrabPointerData &PointerData, int &Index) const
Parameters
|
Improve this Doc
View Source
ForceEndGrab()
Release all currently grabbing pointers. Returns true if any pointers were grabbing and have been released, false if no pointers were grabbing.
Declaration
public: bool ForceEndGrab()
Returns
|
Improve this Doc
View Source
Compute the centroid of the grab points in world space.
Declaration
public: FVector GetGrabPointCentroid(const FTransform &Transform) const
Parameters
Type |
Name |
Description |
const FTransform & |
Transform |
|
Returns
|
Improve this Doc
View Source
Compute the average transform of currently grabbing pointers
Declaration
protected: FTransform GetGrabPointCentroidTransform() const
Returns
Type |
Description |
FTransform |
|
|
Improve this Doc
View Source
GetGrabPointers()
Returns a list of all currently grabbing pointers.
Declaration
public: const TArray<FUxtGrabPointerData> & GetGrabPointers() const
Returns
|
Improve this Doc
View Source
GetPrimaryGrabPointer(bool &Valid, FUxtGrabPointerData &PointerData)
Returns the first active grab pointer. If no pointer is grabbing the Valid output will be false.
Declaration
public: void GetPrimaryGrabPointer(bool &Valid, FUxtGrabPointerData &PointerData) const
Parameters
|
Improve this Doc
View Source
GetSecondaryGrabPointer(bool &Valid, FUxtGrabPointerData &PointerData)
Returns the second active grab pointer. If less than two pointers are grabbing the Valid output will be false.
Declaration
public: void GetSecondaryGrabPointer(bool &Valid, FUxtGrabPointerData &PointerData) const
Parameters
|
Improve this Doc
View Source
GetTargetCentroid()
Compute the centroid of the pointer targets in world space.
Declaration
public: FVector GetTargetCentroid() const
Returns
|
Improve this Doc
View Source
GetTickOnlyWhileGrabbed()
Declaration
public: bool GetTickOnlyWhileGrabbed() const
Returns
|
Improve this Doc
View Source
IsFarFocusable_Implementation(const UPrimitiveComponent *Primitive)
Declaration
protected: virtual bool IsFarFocusable_Implementation(const UPrimitiveComponent *Primitive) override
Parameters
Type |
Name |
Description |
const UPrimitiveComponent * |
Primitive |
|
Returns
|
Improve this Doc
View Source
IsGrabFocusable_Implementation(const UPrimitiveComponent *Primitive)
Declaration
protected: virtual bool IsGrabFocusable_Implementation(const UPrimitiveComponent *Primitive) override
Parameters
Type |
Name |
Description |
const UPrimitiveComponent * |
Primitive |
|
Returns
|
Improve this Doc
View Source
OnBeginGrab_Implementation(UUxtNearPointerComponent *Pointer)
Declaration
protected: virtual void OnBeginGrab_Implementation(UUxtNearPointerComponent *Pointer) override
Parameters
|
Improve this Doc
View Source
OnEndGrab_Implementation(UUxtNearPointerComponent *Pointer)
Declaration
protected: virtual void OnEndGrab_Implementation(UUxtNearPointerComponent *Pointer) override
Parameters
|
Improve this Doc
View Source
OnEnterGrabFocus_Implementation(UUxtNearPointerComponent *Pointer)
Declaration
protected: virtual void OnEnterGrabFocus_Implementation(UUxtNearPointerComponent *Pointer) override
Parameters
|
Improve this Doc
View Source
OnExitGrabFocus_Implementation(UUxtNearPointerComponent *Pointer)
Declaration
protected: virtual void OnExitGrabFocus_Implementation(UUxtNearPointerComponent *Pointer) override
Parameters
|
Improve this Doc
View Source
OnFarDragged_Implementation(UUxtFarPointerComponent *Pointer)
Declaration
protected: virtual void OnFarDragged_Implementation(UUxtFarPointerComponent *Pointer) override
Parameters
|
Improve this Doc
View Source
OnFarPressed_Implementation(UUxtFarPointerComponent *Pointer)
Declaration
protected: virtual void OnFarPressed_Implementation(UUxtFarPointerComponent *Pointer) override
Parameters
|
Improve this Doc
View Source
OnFarReleased_Implementation(UUxtFarPointerComponent *Pointer)
Declaration
protected: virtual void OnFarReleased_Implementation(UUxtFarPointerComponent *Pointer) override
Parameters
|
Improve this Doc
View Source
OnUpdateGrab_Implementation(UUxtNearPointerComponent *Pointer)
Declaration
protected: virtual void OnUpdateGrab_Implementation(UUxtNearPointerComponent *Pointer) override
Parameters
|
Improve this Doc
View Source
OnUpdateGrabFocus_Implementation(UUxtNearPointerComponent *Pointer)
Declaration
protected: virtual void OnUpdateGrabFocus_Implementation(UUxtNearPointerComponent *Pointer) override
Parameters
|
Improve this Doc
View Source
SetTickOnlyWhileGrabbed(bool bEnable)
Declaration
public: void SetTickOnlyWhileGrabbed(bool bEnable)
Parameters
Type |
Name |
Description |
bool |
bEnable |
|