Class UUxtHandConstraintComponent
Component that calculates a goal based on hand tracking and moves the owning actor.
Several zones around the hand supported: radial and ulnar for the thumb side and its opposite, as well as above and below the hand. The goal position is computed by casting a ray in the direction of the zone at a bounding box around the hand joints.
The constraint can be oriented on either the hand rotation alone or facing the player.
Inheritance
System::Object
UActorComponent
UUxtHandConstraintComponent
Namespace:
Assembly: .dll
Syntax
public: class UUxtHandConstraintComponent
Constructors
|
Improve this Doc
View Source
UUxtHandConstraintComponent()
Declaration
public: UUxtHandConstraintComponent()
Fields
|
Improve this Doc
View Source
bMoveOwningActor
Actor transform is moved towards the goal if true. Disable this to only compute the goal without changing the actor transform.
Declaration
public: bool bMoveOwningActor= true
Field Value
|
Improve this Doc
View Source
GoalMargin
Margin between the hand bounding box and the goal location.
Declaration
public: float GoalMargin= 0.0f
Field Value
|
Improve this Doc
View Source
Hand
Hand to use for the constraint. If set to 'Any Hand' the first tracked hand will be used, until tracking is lost.
Declaration
public: EControllerHand Hand= EControllerHand::AnyHand
Field Value
Type |
Description |
EControllerHand |
|
|
Improve this Doc
View Source
LocationLerpTime
Interpolation time for smoothed translation. Set to zero to disable smoothing.
Declaration
public: float LocationLerpTime= 0.05f
Field Value
|
Improve this Doc
View Source
OffsetMode
Determines how the offset vector is computed.
Declaration
public: EUxtHandConstraintOffsetMode OffsetMode= EUxtHandConstraintOffsetMode::LookAtCamera
Field Value
Type |
Description |
EUxtHandConstraintOffsetMode |
|
|
Improve this Doc
View Source
OnBeginTracking
Event raised when the constraint begins tracking a hand.
Declaration
public: FUxtHandConstraintBeginTrackingDelegate OnBeginTracking
Field Value
Type |
Description |
FUxtHandConstraintBeginTrackingDelegate |
|
|
Improve this Doc
View Source
OnConstraintActivated
Event raised when the constraint becomes active, as indicated by the bIsConstraintActive property.
Declaration
public: FUxtHandConstraintActivatedDelegate OnConstraintActivated
Field Value
Type |
Description |
FUxtHandConstraintActivatedDelegate |
|
|
Improve this Doc
View Source
OnConstraintDeactivated
Event raised when the constraint becomes inactive, as indicated by the bIsConstraintActive property.
Declaration
public: FUxtHandConstraintDeactivatedDelegate OnConstraintDeactivated
Field Value
Type |
Description |
FUxtHandConstraintDeactivatedDelegate |
|
|
Improve this Doc
View Source
OnEndTracking
Event raised when the constraint ends tracking a hand.
Declaration
public: FUxtHandConstraintEndTrackingDelegate OnEndTracking
Field Value
Type |
Description |
FUxtHandConstraintEndTrackingDelegate |
|
|
Improve this Doc
View Source
RotationLerpTime
Interpolation time for smoothed rotation. Set to zero to disable smoothing.
Declaration
public: float RotationLerpTime= 0.05f
Field Value
|
Improve this Doc
View Source
RotationMode
Determines how the goal rotation is computed.
Declaration
public: EUxtHandConstraintRotationMode RotationMode= EUxtHandConstraintRotationMode::LookAtCamera
Field Value
Type |
Description |
EUxtHandConstraintRotationMode |
|
|
Improve this Doc
View Source
Zone
Safe zone that determines the target location of the constraint relative to the hand.
Declaration
public: EUxtHandConstraintZone Zone= EUxtHandConstraintZone::UlnarSide
Field Value
Type |
Description |
EUxtHandConstraintZone |
|
Methods
|
Improve this Doc
View Source
BeginPlay()
Declaration
protected: virtual void BeginPlay() override
|
Improve this Doc
View Source
GetGoalLocation()
Declaration
public: const FVector & GetGoalLocation() const
Returns
Type |
Description |
const FVector & |
|
|
Improve this Doc
View Source
GetGoalRotation()
Declaration
public: const FQuat & GetGoalRotation() const
Returns
Type |
Description |
const FQuat & |
|
|
Improve this Doc
View Source
GetHandBounds()
Declaration
public: const FBox & GetHandBounds() const
Returns
Type |
Description |
const FBox & |
|
|
Improve this Doc
View Source
GetTrackedHand()
Declaration
public: EControllerHand GetTrackedHand() const
Returns
Type |
Description |
EControllerHand |
|
|
Improve this Doc
View Source
IsConstraintActive()
Declaration
public: bool IsConstraintActive() const
Returns
|
Improve this Doc
View Source
IsHandUsableForConstraint(EControllerHand NewHand)
Returns true if the given hand is eligible for the constraint. If the hand is rejected the constraint will be deactivated.
Declaration
public: virtual bool IsHandUsableForConstraint(EControllerHand NewHand) const
Parameters
Type |
Name |
Description |
EControllerHand |
NewHand |
|
Returns
|
Improve this Doc
View Source
TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction)
Declaration
protected: virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override
Parameters
Type |
Name |
Description |
float |
DeltaTime |
|
ELevelTick |
TickType |
|
FActorComponentTickFunction * |
ThisTickFunction |
|