|
|
A Demo Project for the UnrealEngineSDK
|
APixoVRHand is an actor class that represents a hand in the VR environment. More...
#include <PixoVRHand.h>
Public Member Functions | |
| APixoVRHand () | |
| void | DeactivateTouchCooldown () |
| Deactivates the touch cooldown of the hand. | |
| bool | DenyDropping () |
| Deny dropping. If this is set to true the actor will not be dropped after releasing until set to false again. | |
| bool | DenyGrippingPixoVR (UGripMotionControllerComponent *GrippingController) |
| Deny gripping. If this is set to true the actor can't be gripped anymore until set the false again. | |
| bool | DenyTriggerGripping () |
| Deny gripping after triggering grip. | |
| bool | DisablePhysicsOnDrop () |
| Disable Physics on Drop. When this is set to 'true' if user drops object it will disable physics else it will use default. | |
| TArray< FVector > | GetRelativePointsArray (USplineComponent *FingerSpline, float Precision) |
| Retrieves an array of relative points along the finger spline. | |
| void | GrabObject () |
| Grabs the object currently overlapped by grab sphere. | |
| void | GripMode (EPixoVRGripModeEnum &GripMode) |
| Will be used to determine how to do the grabbing. Using normal attachment or a physics constraint. | |
| void | GripTriggerMode (EPixoVRGripTriggerModeEnum &GripTriggerMode) |
| Will be used to determine how the gripping trigger should behave. | |
| void | GripTriggerTransform (UGripMotionControllerComponent *GrippingController, bool &UseCustomTransform, FTransform &CustomTransform) |
| This specified transformation will be used when flag is set and a grip is happening. | |
| void | InitPixoVRHands (EControllerHand MotionSource, APixoVRCharacter *Character) |
| void | ManuallyPutActorToHand (AActor *ActorRef) |
| Manually puts an actor into the hand. Hand will try to grab this actor. | |
| void | OnGripObject (UGripMotionControllerComponent *GrippingController, AActor *GrippedActor) |
| Will be called when user grabs an object. | |
| void | OnGripObjectRelease (UGripMotionControllerComponent *ReleasingController, AActor *GrippedActor) |
| Will be called when the user releases an object. | |
| void | OnObjectPaused () |
| This event runs when the user "pauses" this object. Pausing should turn off visibility and functionality of this object. | |
| void | OnObjectUnPaused () |
| This event runs when the user "unpauses" this object. Unpausing should turn on visibility and functionality of this object. | |
| void | OnTouchWidget (UWidgetComponent *WidgetComponent, UWidgetComponent *PreviousWidgetComponent) |
| Called when the hand touches a widget component. | |
| void | OnTryGripObject (UGripMotionControllerComponent *GrippingController, AActor *GrippedActor) |
| Will be called when user tried to grab the object. | |
| void | ReleaseHeldObjectOnOtherHand (AActor *HeldActor) |
| Releases the held object on the other hand. | |
| void | ReleaseObject () |
| Releases the currently held object. | |
| void | SetupFingerTracePoints () |
| Sets up the cache of relative points for finger tracing. This function should be called during initialization to precalculate the relative points along each finger spline. | |
| virtual void | Tick (float DeltaTime) override |
| void | ToggleLaser (bool Visible) |
| Toggles the visibility of the laser. | |
| float | TraceFingerForObstacle (TArray< FVector > RelativePointsArray) |
| Traces the finger along the given array of relative points to check for obstacles. | |
| void | UpdateFingerData () |
| Updates the finger data by tracing each finger for obstacles and storing the normalized obstacle distances. This function should be when we trying to grip object. | |
Public Attributes | |
| bool | ChangeHandAnimationNearInteractableObject = false |
| UPROPERTY(EditDefaultsOnly, Category = "Animation") | |
| FFingerData | FingerData |
| UPROPERTY(EditAnywhere, BlueprintReadWrite, Replicated, Category = "Animation") | |
| USphereComponent * | GrabSphere |
| UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Components") | |
| EGrippableTypeChecker | GrippableTypeChecker = EGrippableTypeChecker::Default |
| Flag that indicated near which objects should we change animation. | |
| UObject * | HandHoldingObject |
| UPROPERTY(BlueprintReadOnly, Replicated, Category = "PixoVR") | |
| USkeletalMeshComponent * | HandMesh |
| UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Components") | |
| EControllerHand | HandMotionSource |
| UPROPERTY(BlueprintReadWrite, Category = "Init", meta = (ExposeOnSpawn = "true")) | |
| TArray< FVector > | IndexPositionCache |
| USplineComponent * | IndexSpline |
| UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components") | |
| bool | InteractableObjectNearHand = false |
| bool | IsObjectHighlightActive = false |
| Show highlight if hand near object that we can grab. | |
| UStaticMeshComponent * | LaserMesh |
| UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Components") | |
| USoundCue * | LaserSound |
| UPROPERTY() | |
| TArray< FVector > | MiddlePositionCache |
| USplineComponent * | MiddleSpline |
| UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components") | |
| UGripMotionControllerComponent * | MotionController |
| UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Components") | |
| AActor * | OverlapedActor = nullptr |
| APixoVRCharacter * | OwningCharacter |
| UPROPERTY(BlueprintReadWrite, Category = "Init") | |
| TArray< FVector > | PinkyPositionCache |
| USplineComponent * | PinkySpline |
| UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components") | |
| TArray< FVector > | RingPositionCache |
| USplineComponent * | RingSpline |
| UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components") | |
| USceneComponent * | Root |
| UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Components") | |
| TArray< FVector > | ThumbPositionCache |
| USplineComponent * | ThumbSpline |
| UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components") | |
| UWidgetInteractionComponent * | TouchComponent |
| UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components") | |
| bool | UseCustomAnimation = false |
| UPROPERTY(BlueprintReadWrite, Category = "Animation") | |
Protected Member Functions | |
| virtual void | BeginPlay () override |
| void | GetOverlappingActor (FOverlappingInfo &OverlappingInfo) |
| Gets the info of actor currently overlapping with the grab sphere. | |
Protected Attributes | |
| bool | TouchComponentCooldownActive |
Private Member Functions | |
| GENERATED_BODY () | |
APixoVRHand is an actor class that represents a hand in the VR environment.
UCLASS()
Definition at line 98 of file PixoVRHand.h.
| APixoVRHand::APixoVRHand | ( | ) |
|
overrideprotectedvirtual |
Definition at line 271 of file PixoVRHand.cpp.
|
BlueprintCallable |
Deactivates the touch cooldown of the hand.
UFUNCTION(BlueprintCallable, Category = "TouchWidget")
Definition at line 137 of file PixoVRHand.cpp.
|
inheritedBlueprintCallableBlueprintNativeEvent |
Deny dropping. If this is set to true the actor will not be dropped after releasing until set to false again.
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
|
inheritedBlueprintCallableBlueprintNativeEvent |
Deny gripping. If this is set to true the actor can't be gripped anymore until set the false again.
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
|
inheritedBlueprintCallableBlueprintNativeEvent |
Deny gripping after triggering grip.
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
|
inheritedBlueprintCallableBlueprintNativeEvent |
Disable Physics on Drop. When this is set to 'true' if user drops object it will disable physics else it will use default.
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
|
private |
|
protected |
Gets the info of actor currently overlapping with the grab sphere.
| OverlappingInfo | The struct to store the overlapping information. |
Definition at line 395 of file PixoVRHand.cpp.
|
BlueprintCallable |
Retrieves an array of relative points along the finger spline.
| FingerSpline | The spline component representing the finger. |
| Precision | The number of points to generate along the spline. |
UFUNCTION(BlueprintCallable, Category = "Animation")
Definition at line 183 of file PixoVRHand.cpp.
| void APixoVRHand::GrabObject | ( | ) |
Grabs the object currently overlapped by grab sphere.
UFUNCTION()
Definition at line 74 of file PixoVRHand.cpp.
|
inheritedBlueprintCallableBlueprintNativeEvent |
Will be used to determine how to do the grabbing. Using normal attachment or a physics constraint.
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
|
inheritedBlueprintCallableBlueprintNativeEvent |
Will be used to determine how the gripping trigger should behave.
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
|
inheritedBlueprintCallableBlueprintNativeEvent |
This specified transformation will be used when flag is set and a grip is happening.
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
| void APixoVRHand::InitPixoVRHands | ( | EControllerHand | MotionSource, |
| APixoVRCharacter * | Character ) |
| void APixoVRHand::ManuallyPutActorToHand | ( | AActor * | ActorRef | ) |
Manually puts an actor into the hand. Hand will try to grab this actor.
| ActorRef | The actor to put into the hand. |
UFUNCTION()
Definition at line 116 of file PixoVRHand.cpp.
|
inheritedBlueprintCallableBlueprintNativeEvent |
Will be called when user grabs an object.
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
|
inheritedBlueprintCallableBlueprintNativeEvent |
Will be called when the user releases an object.
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
|
inheritedBlueprintCallableBlueprintNativeEvent |
This event runs when the user "pauses" this object. Pausing should turn off visibility and functionality of this object.
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
|
inheritedBlueprintCallableBlueprintNativeEvent |
This event runs when the user "unpauses" this object. Unpausing should turn on visibility and functionality of this object.
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
|
BlueprintCallable |
Called when the hand touches a widget component.
| WidgetComponent | The widget component that was touched. |
| PreviousWidgetComponent | The previously touched widget component. |
UFUNCTION(BlueprintCallable, Category = "TouchWidget")
Definition at line 126 of file PixoVRHand.cpp.
|
inheritedBlueprintCallableBlueprintNativeEvent |
Will be called when user tried to grab the object.
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
| void APixoVRHand::ReleaseHeldObjectOnOtherHand | ( | AActor * | HeldActor | ) |
Releases the held object on the other hand.
| HeldActor | The actor that is being held. |
UFUNCTION()
Definition at line 143 of file PixoVRHand.cpp.
| void APixoVRHand::ReleaseObject | ( | ) |
Releases the currently held object.
UFUNCTION()
Definition at line 101 of file PixoVRHand.cpp.
|
BlueprintCallable |
Sets up the cache of relative points for finger tracing. This function should be called during initialization to precalculate the relative points along each finger spline.
UFUNCTION(BlueprintCallable, Category = "Animation")
Definition at line 251 of file PixoVRHand.cpp.
|
overridevirtual |
|
BlueprintCallable |
Toggles the visibility of the laser.
| Visible | Indicates whether the laser should be visible or not. |
UFUNCTION(BlueprintCallable)
Definition at line 176 of file PixoVRHand.cpp.
|
BlueprintCallable |
Traces the finger along the given array of relative points to check for obstacles.
| RelativePointsArray | The array of relative points along the finger spline. |
UFUNCTION(BlueprintCallable, Category = "Animation")
Definition at line 207 of file PixoVRHand.cpp.
|
BlueprintCallable |
Updates the finger data by tracing each finger for obstacles and storing the normalized obstacle distances. This function should be when we trying to grip object.
UFUNCTION(BlueprintCallable, Category = "Animation")
Definition at line 261 of file PixoVRHand.cpp.
|
EditDefaultsOnly |
UPROPERTY(EditDefaultsOnly, Category = "Animation")
Definition at line 303 of file PixoVRHand.h.
|
EditAnywhereReplicatedBlueprintReadWrite |
UPROPERTY(EditAnywhere, BlueprintReadWrite, Replicated, Category = "Animation")
Definition at line 282 of file PixoVRHand.h.
|
BlueprintReadWriteVisibleAnywhere |
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Components")
Definition at line 124 of file PixoVRHand.h.
|
EditDefaultsOnly |
Flag that indicated near which objects should we change animation.
UPROPERTY(EditDefaultsOnly, Category = "Animation", meta = (EditCondition = "ChangeHandAnimationNearInteractableObject == true", EditConditionHides))
Definition at line 311 of file PixoVRHand.h.
|
ReplicatedBlueprintReadOnly |
UPROPERTY(BlueprintReadOnly, Replicated, Category = "PixoVR")
Definition at line 228 of file PixoVRHand.h.
|
BlueprintReadWriteVisibleAnywhere |
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Components")
Definition at line 130 of file PixoVRHand.h.
|
BlueprintReadWrite |
UPROPERTY(BlueprintReadWrite, Category = "Init", meta = (ExposeOnSpawn = "true"))
Definition at line 352 of file PixoVRHand.h.
| TArray<FVector> APixoVRHand::IndexPositionCache |
Definition at line 324 of file PixoVRHand.h.
|
EditAnywhereBlueprintReadWrite |
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
Definition at line 148 of file PixoVRHand.h.
| bool APixoVRHand::InteractableObjectNearHand = false |
Definition at line 320 of file PixoVRHand.h.
|
EditDefaultsOnly |
Show highlight if hand near object that we can grab.
UPROPERTY(EditDefaultsOnly, Category = "Animation", meta = (EditCondition = "ChangeHandAnimationNearInteractableObject == true", EditConditionHides))
Definition at line 319 of file PixoVRHand.h.
|
BlueprintReadWriteVisibleAnywhere |
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Components")
Definition at line 136 of file PixoVRHand.h.
| USoundCue* APixoVRHand::LaserSound |
UPROPERTY()
Definition at line 242 of file PixoVRHand.h.
| TArray<FVector> APixoVRHand::MiddlePositionCache |
Definition at line 325 of file PixoVRHand.h.
|
EditAnywhereBlueprintReadWrite |
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
Definition at line 154 of file PixoVRHand.h.
|
BlueprintReadWriteVisibleAnywhere |
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Components")
Definition at line 118 of file PixoVRHand.h.
| AActor* APixoVRHand::OverlapedActor = nullptr |
Definition at line 321 of file PixoVRHand.h.
|
BlueprintReadWrite |
UPROPERTY(BlueprintReadWrite, Category = "Init")
Definition at line 358 of file PixoVRHand.h.
| TArray<FVector> APixoVRHand::PinkyPositionCache |
Definition at line 327 of file PixoVRHand.h.
|
EditAnywhereBlueprintReadWrite |
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
Definition at line 166 of file PixoVRHand.h.
| TArray<FVector> APixoVRHand::RingPositionCache |
Definition at line 326 of file PixoVRHand.h.
|
EditAnywhereBlueprintReadWrite |
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
Definition at line 160 of file PixoVRHand.h.
|
BlueprintReadWriteVisibleAnywhere |
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Components")
Definition at line 112 of file PixoVRHand.h.
| TArray<FVector> APixoVRHand::ThumbPositionCache |
Definition at line 323 of file PixoVRHand.h.
|
EditAnywhereBlueprintReadWrite |
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
Definition at line 142 of file PixoVRHand.h.
|
EditAnywhereBlueprintReadWrite |
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
Definition at line 172 of file PixoVRHand.h.
|
protected |
Definition at line 339 of file PixoVRHand.h.
|
BlueprintReadWrite |
UPROPERTY(BlueprintReadWrite, Category = "Animation")
Should we use custom animation instead advanced grab.
Definition at line 297 of file PixoVRHand.h.