4#include "CoreMinimal.h"
8#include "Components/ActorComponent.h"
18UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
27 UFUNCTION(BlueprintCallable)
30 UFUNCTION(BlueprintCallable)
31 void UpdatePhysicsWithDelay(
float Delay);
33 float GetDistanceBetweenPhysAndPhantomHands();
35 USkeletalMeshComponent* PhysicalHand;
37 USkeletalMeshComponent* PhantomHand;
39 UPhysicsConstraintComponent* ConstraintComponent;
42 virtual
void BeginPlay() override;
46 virtual
void TickComponent(
float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
55 void UpdateGrabbedObjectPhysics();
57 void AddSpheresBodies(UBodySetup* BodySetup, FTransform RelativeTransform, UStaticMeshComponent* mesh,
int startIndex);
59 void ResetBodies(UBodySetup* bodySetup);
61 void AddBoxBodies(UBodySetup* BodySetup, FTransform RelativeTransform, UStaticMeshComponent* mesh,
int startIndex);
63 void AddCapsulesBodies(UBodySetup* BodySetup, FTransform RelativeTransform, UStaticMeshComponent* mesh,
int startIndex);
65 void AddConvexBodies(UBodySetup* BodySetup, FTransform RelativeTransform, UStaticMeshComponent* mesh,
int startIndex);
67 float PhysicsUpdateTimerInterval = 0.1;
71 const
int SpherePrimitiveCount = 30;
73 const
int CapsulePrimitiveCount = 3;
74 const FName RootBoneName = "HandRig";
75 const FName ConstraintTag = "HandConstraint";
76 const FName PhantomHandTag = "PhantomHand";
77 const FName PhysicalHandTag = "HandMesh";
#define WEARTPLUGIN_API
Definition: Definitions.WEARTPlugin.h:292
Controls hand interactions and haptic feedback.
Handles the physics interactions between physical and phantom hands.