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;
43 virtual
void BeginPlay() override;
45 TArray<FVector> GetVertices(UStaticMeshComponent* MeshComponent) const;
49 virtual
void TickComponent(
float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
58 void UpdateGrabbedObjectPhysics();
60 void AddSpheresBodies(UBodySetup* BodySetup, FTransform RelativeTransform, FKAggregateGeom AggGeom,
int startIndex);
62 void ResetBodies(UBodySetup* bodySetup);
64 void AddBoxBodies(UBodySetup* BodySetup, FTransform RelativeTransform, FKAggregateGeom AggGeom,
int startIndex);
66 void AddCapsulesBodies(UBodySetup* BodySetup, FTransform RelativeTransform, FKAggregateGeom AggGeom,
int startIndex);
68 void AddConvexBodies(UBodySetup* BodySetup, FTransform RelativeTransform);
70 float PhysicsUpdateTimerInterval = 0.1;
74 const
int SpherePrimitiveCount = 30;
76 const
int CapsulePrimitiveCount = 3;
77 const FName RootBoneName = "HandRig";
78 const FName ConstraintTag = "HandConstraint";
79 const FName PhantomHandTag = "PhantomHand";
80 const FName PhysicalHandTag = "HandMesh";
#define WEARTPLUGIN_API
Definition: Definitions.WEARTPlugin.h:26
Controls hand interactions and haptic feedback.
Handles the physics interactions between physical and phantom hands.