add a grab socket uproperty, getters, and setters
This commit is contained in:
@@ -210,19 +210,21 @@ USGVirtualHandComponent::USGVirtualHandComponent(const FObjectInitializer& Objec
|
||||
|
||||
bRight = true;
|
||||
|
||||
GrabSocketName = FName{TEXT("GrabPoint")};
|
||||
|
||||
DefaultFingertipsGrabColliderSize = FVector{0.04f, 0.04f, 0.04f};
|
||||
|
||||
ThumbFingertipGrabSocketName = FName(TEXT("GrabThumbFingertip"));
|
||||
IndexFingertipGrabSocketName = FName(TEXT("GrabIndexFingertip"));
|
||||
MiddleFingertipGrabSocketName = FName(TEXT("GrabMiddleFingertip"));
|
||||
ThumbFingertipGrabSocketName = FName{TEXT("GrabThumbFingertip")};
|
||||
IndexFingertipGrabSocketName = FName{TEXT("GrabIndexFingertip")};
|
||||
MiddleFingertipGrabSocketName = FName{TEXT("GrabMiddleFingertip")};
|
||||
|
||||
DefaultFingertipsTouchColliderSize = FVector{0.04f, 0.04f, 0.04f};
|
||||
|
||||
ThumbFingertipTouchSocketName = FName(TEXT("TouchThumbFingertip"));
|
||||
IndexFingertipTouchSocketName = FName(TEXT("TouchIndexFingertip"));
|
||||
MiddleFingertipTouchSocketName = FName(TEXT("TouchMiddleFingertip"));
|
||||
RingFingertipTouchSocketName = FName(TEXT("TouchRingFingertip"));
|
||||
PinkyFingertipTouchSocketName = FName(TEXT("TouchPinkyFingertip"));
|
||||
ThumbFingertipTouchSocketName = FName{TEXT("TouchThumbFingertip")};
|
||||
IndexFingertipTouchSocketName = FName{TEXT("TouchIndexFingertip")};
|
||||
MiddleFingertipTouchSocketName = FName{TEXT("TouchMiddleFingertip")};
|
||||
RingFingertipTouchSocketName = FName{TEXT("TouchRingFingertip")};
|
||||
PinkyFingertipTouchSocketName = FName{TEXT("TouchPinkyFingertip")};
|
||||
|
||||
bHiddenInGameIfNoGloveDetected = false;
|
||||
|
||||
|
||||
@@ -84,6 +84,9 @@ private:
|
||||
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||
uint8 bRight : 1;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category="SenseGlove | Grab", meta=(AllowPrivateAccess="false"))
|
||||
FName GrabSocketName;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category="SenseGlove | Grab", meta=(AllowPrivateAccess="false"))
|
||||
FVector DefaultFingertipsGrabColliderSize;
|
||||
|
||||
@@ -144,6 +147,11 @@ public:
|
||||
|
||||
void SetRight(const bool bInRight);
|
||||
|
||||
FORCEINLINE const FName& GetGrabSocketName() const
|
||||
{
|
||||
return GrabSocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE const FVector& GetDefaultFingertipsGrabColliderSize() const
|
||||
{
|
||||
return DefaultFingertipsGrabColliderSize;
|
||||
@@ -154,9 +162,9 @@ public:
|
||||
return ThumbFingertipGrabSocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE void SetThumbFingertipGrabSocketName(const FName& GrabSocketName)
|
||||
FORCEINLINE void SetThumbFingertipGrabSocketName(const FName& SocketName)
|
||||
{
|
||||
ThumbFingertipGrabSocketName = GrabSocketName;
|
||||
ThumbFingertipGrabSocketName = SocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE const FName& GetIndexFingertipGrabSocketName() const
|
||||
@@ -164,9 +172,9 @@ public:
|
||||
return IndexFingertipGrabSocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE void SetIndexFingertipGrabSocketName(const FName& GrabSocketName)
|
||||
FORCEINLINE void SetIndexFingertipGrabSocketName(const FName& SocketName)
|
||||
{
|
||||
IndexFingertipGrabSocketName = GrabSocketName;
|
||||
IndexFingertipGrabSocketName = SocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE const FName& GetMiddleFingertipGrabSocketName() const
|
||||
@@ -174,9 +182,9 @@ public:
|
||||
return MiddleFingertipGrabSocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE void SetMiddleFingertipGrabSocketName(const FName& GrabSocketName)
|
||||
FORCEINLINE void SetMiddleFingertipGrabSocketName(const FName& SocketName)
|
||||
{
|
||||
MiddleFingertipGrabSocketName = GrabSocketName;
|
||||
MiddleFingertipGrabSocketName = SocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE const FVector& GetDefaultFingertipsTouchColliderSize() const
|
||||
@@ -189,9 +197,9 @@ public:
|
||||
return ThumbFingertipTouchSocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE void SetThumbFingertipTouchSocketName(const FName& TouchSocketName)
|
||||
FORCEINLINE void SetThumbFingertipTouchSocketName(const FName& SocketName)
|
||||
{
|
||||
ThumbFingertipTouchSocketName = TouchSocketName;
|
||||
ThumbFingertipTouchSocketName = SocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE const FName& GetIndexFingertipTouchSocketName() const
|
||||
@@ -199,9 +207,9 @@ public:
|
||||
return IndexFingertipTouchSocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE void SetIndexFingertipTouchSocketName(const FName& TouchSocketName)
|
||||
FORCEINLINE void SetIndexFingertipTouchSocketName(const FName& SocketName)
|
||||
{
|
||||
IndexFingertipTouchSocketName = TouchSocketName;
|
||||
IndexFingertipTouchSocketName = SocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE const FName& GetMiddleFingertipTouchSocketName() const
|
||||
@@ -209,9 +217,9 @@ public:
|
||||
return MiddleFingertipTouchSocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE void SetMiddleFingertipTouchSocketName(const FName& TouchSocketName)
|
||||
FORCEINLINE void SetMiddleFingertipTouchSocketName(const FName& SocketName)
|
||||
{
|
||||
MiddleFingertipTouchSocketName = TouchSocketName;
|
||||
MiddleFingertipTouchSocketName = SocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE const FName& GetRingFingertipTouchSocketName() const
|
||||
@@ -219,9 +227,9 @@ public:
|
||||
return RingFingertipTouchSocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE void SetRingFingertipTouchSocketName(const FName& TouchSocketName)
|
||||
FORCEINLINE void SetRingFingertipTouchSocketName(const FName& SocketName)
|
||||
{
|
||||
RingFingertipTouchSocketName = TouchSocketName;
|
||||
RingFingertipTouchSocketName = SocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE const FName& GetPinkyFingertipTouchSocketName() const
|
||||
@@ -229,9 +237,9 @@ public:
|
||||
return PinkyFingertipTouchSocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE void SetPinkyFingertipTouchSocketName(const FName& TouchSocketName)
|
||||
FORCEINLINE void SetPinkyFingertipTouchSocketName(const FName& SocketName)
|
||||
{
|
||||
PinkyFingertipTouchSocketName = TouchSocketName;
|
||||
PinkyFingertipTouchSocketName = SocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE bool IsHiddenInGameIfNoGloveDetected() const
|
||||
|
||||
@@ -77,6 +77,11 @@ void UVirtualHandComponentKismetLibrary::SetRight(USGVirtualHandComponent* Virtu
|
||||
VirtualHandComponent->SetRight(bInRight);
|
||||
}
|
||||
|
||||
const FName& UVirtualHandComponentKismetLibrary::GetGrabSocketName(const USGVirtualHandComponent* VirtualHandComponent)
|
||||
{
|
||||
return VirtualHandComponent->GetGrabSocketName();
|
||||
}
|
||||
|
||||
const FVector& UVirtualHandComponentKismetLibrary::GetDefaultFingertipsGrabColliderSize(
|
||||
const USGVirtualHandComponent* VirtualHandComponent)
|
||||
{
|
||||
@@ -90,9 +95,9 @@ const FName& UVirtualHandComponentKismetLibrary::GetThumbFingertipGrabSocketName
|
||||
}
|
||||
|
||||
void UVirtualHandComponentKismetLibrary::SetThumbFingertipGrabSocketName(USGVirtualHandComponent* VirtualHandComponent,
|
||||
const FName& GrabSocketName)
|
||||
const FName& SocketName)
|
||||
{
|
||||
VirtualHandComponent->SetThumbFingertipGrabSocketName(GrabSocketName);
|
||||
VirtualHandComponent->SetThumbFingertipGrabSocketName(SocketName);
|
||||
}
|
||||
|
||||
const FName& UVirtualHandComponentKismetLibrary::GetIndexFingertipGrabSocketName(
|
||||
@@ -102,9 +107,9 @@ const FName& UVirtualHandComponentKismetLibrary::GetIndexFingertipGrabSocketName
|
||||
}
|
||||
|
||||
void UVirtualHandComponentKismetLibrary::SetIndexFingertipGrabSocketName(USGVirtualHandComponent* VirtualHandComponent,
|
||||
const FName& GrabSocketName)
|
||||
const FName& SocketName)
|
||||
{
|
||||
VirtualHandComponent->SetIndexFingertipGrabSocketName(GrabSocketName);
|
||||
VirtualHandComponent->SetIndexFingertipGrabSocketName(SocketName);
|
||||
}
|
||||
|
||||
const FName& UVirtualHandComponentKismetLibrary::GetMiddleFingertipGrabSocketName(
|
||||
@@ -114,9 +119,9 @@ const FName& UVirtualHandComponentKismetLibrary::GetMiddleFingertipGrabSocketNam
|
||||
}
|
||||
|
||||
void UVirtualHandComponentKismetLibrary::SetMiddleFingertipGrabSocketName(USGVirtualHandComponent* VirtualHandComponent,
|
||||
const FName& GrabSocketName)
|
||||
const FName& SocketName)
|
||||
{
|
||||
VirtualHandComponent->SetMiddleFingertipGrabSocketName(GrabSocketName);
|
||||
VirtualHandComponent->SetMiddleFingertipGrabSocketName(SocketName);
|
||||
}
|
||||
|
||||
const FVector& UVirtualHandComponentKismetLibrary::GetDefaultFingertipsTouchColliderSize(
|
||||
@@ -132,9 +137,9 @@ const FName& UVirtualHandComponentKismetLibrary::GetThumbFingertipTouchSocketNam
|
||||
}
|
||||
|
||||
void UVirtualHandComponentKismetLibrary::SetThumbFingertipTouchSocketName(USGVirtualHandComponent* VirtualHandComponent,
|
||||
const FName& TouchSocketName)
|
||||
const FName& SocketName)
|
||||
{
|
||||
VirtualHandComponent->SetThumbFingertipTouchSocketName(TouchSocketName);
|
||||
VirtualHandComponent->SetThumbFingertipTouchSocketName(SocketName);
|
||||
}
|
||||
|
||||
const FName& UVirtualHandComponentKismetLibrary::GetIndexFingertipTouchSocketName(
|
||||
@@ -144,9 +149,9 @@ const FName& UVirtualHandComponentKismetLibrary::GetIndexFingertipTouchSocketNam
|
||||
}
|
||||
|
||||
void UVirtualHandComponentKismetLibrary::SetIndexFingertipTouchSocketName(USGVirtualHandComponent* VirtualHandComponent,
|
||||
const FName& TouchSocketName)
|
||||
const FName& SocketName)
|
||||
{
|
||||
VirtualHandComponent->SetIndexFingertipTouchSocketName(TouchSocketName);
|
||||
VirtualHandComponent->SetIndexFingertipTouchSocketName(SocketName);
|
||||
}
|
||||
|
||||
const FName& UVirtualHandComponentKismetLibrary::GetMiddleFingertipTouchSocketName(
|
||||
@@ -157,9 +162,9 @@ const FName& UVirtualHandComponentKismetLibrary::GetMiddleFingertipTouchSocketNa
|
||||
|
||||
void UVirtualHandComponentKismetLibrary::SetMiddleFingertipTouchSocketName(
|
||||
USGVirtualHandComponent* VirtualHandComponent,
|
||||
const FName& TouchSocketName)
|
||||
const FName& SocketName)
|
||||
{
|
||||
VirtualHandComponent->SetMiddleFingertipTouchSocketName(TouchSocketName);
|
||||
VirtualHandComponent->SetMiddleFingertipTouchSocketName(SocketName);
|
||||
}
|
||||
|
||||
const FName& UVirtualHandComponentKismetLibrary::GetRingFingertipTouchSocketName(
|
||||
@@ -169,9 +174,9 @@ const FName& UVirtualHandComponentKismetLibrary::GetRingFingertipTouchSocketName
|
||||
}
|
||||
|
||||
void UVirtualHandComponentKismetLibrary::SetRingFingertipTouchSocketName(USGVirtualHandComponent* VirtualHandComponent,
|
||||
const FName& TouchSocketName)
|
||||
const FName& SocketName)
|
||||
{
|
||||
VirtualHandComponent->SetRingFingertipTouchSocketName(TouchSocketName);
|
||||
VirtualHandComponent->SetRingFingertipTouchSocketName(SocketName);
|
||||
}
|
||||
|
||||
const FName& UVirtualHandComponentKismetLibrary::GetPinkyFingertipTouchSocketName(
|
||||
@@ -181,9 +186,9 @@ const FName& UVirtualHandComponentKismetLibrary::GetPinkyFingertipTouchSocketNam
|
||||
}
|
||||
|
||||
void UVirtualHandComponentKismetLibrary::SetPinkyFingertipTouchSocketName(USGVirtualHandComponent* VirtualHandComponent,
|
||||
const FName& TouchSocketName)
|
||||
const FName& SocketName)
|
||||
{
|
||||
VirtualHandComponent->SetPinkyFingertipTouchSocketName(TouchSocketName);
|
||||
VirtualHandComponent->SetPinkyFingertipTouchSocketName(SocketName);
|
||||
}
|
||||
|
||||
bool UVirtualHandComponentKismetLibrary::IsHiddenInGameIfNoGloveDetected(
|
||||
|
||||
@@ -80,6 +80,9 @@ public:
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static void SetRight(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent, bool bInRight);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FName& GetGrabSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FVector& GetDefaultFingertipsGrabColliderSize(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
@@ -88,21 +91,21 @@ public:
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static void SetThumbFingertipGrabSocketName(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
||||
const FName& GrabSocketName);
|
||||
const FName& SocketName);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FName& GetIndexFingertipGrabSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static void SetIndexFingertipGrabSocketName(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
||||
const FName& GrabSocketName);
|
||||
const FName& SocketName);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FName& GetMiddleFingertipGrabSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static void SetMiddleFingertipGrabSocketName(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
||||
const FName& GrabSocketName);
|
||||
const FName& SocketName);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FVector& GetDefaultFingertipsTouchColliderSize(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
@@ -112,35 +115,35 @@ public:
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static void SetThumbFingertipTouchSocketName(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
||||
const FName& TouchSocketName);
|
||||
const FName& SocketName);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FName& GetIndexFingertipTouchSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static void SetIndexFingertipTouchSocketName(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
||||
const FName& TouchSocketName);
|
||||
const FName& SocketName);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FName& GetMiddleFingertipTouchSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static void SetMiddleFingertipTouchSocketName(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
||||
const FName& TouchSocketName);
|
||||
const FName& SocketName);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FName& GetRingFingertipTouchSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static void SetRingFingertipTouchSocketName(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
||||
const FName& TouchSocketName);
|
||||
const FName& SocketName);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FName& GetPinkyFingertipTouchSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static void SetPinkyFingertipTouchSocketName(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
||||
const FName& TouchSocketName);
|
||||
const FName& SocketName);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static bool IsHiddenInGameIfNoGloveDetected(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
Reference in New Issue
Block a user