add the api and setup the required components and uproperties in order to implement the basic grab functionality
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
#include "SenseGlove/Components/SGVirtualHandComponent.h"
|
#include "SenseGlove/Components/SGVirtualHandComponent.h"
|
||||||
|
|
||||||
#include "Animation/Skeleton.h"
|
#include "Animation/Skeleton.h"
|
||||||
|
#include "Components/SphereComponent.h"
|
||||||
#include "Components/SkeletalMeshComponent.h"
|
#include "Components/SkeletalMeshComponent.h"
|
||||||
#include "Engine/SkeletalMesh.h"
|
#include "Engine/SkeletalMesh.h"
|
||||||
#include "Kismet/GameplayStatics.h"
|
#include "Kismet/GameplayStatics.h"
|
||||||
@@ -208,7 +209,15 @@ USGVirtualHandComponent::USGVirtualHandComponent(const FObjectInitializer& Objec
|
|||||||
Super::SetAnimClass(USGVirtualHandAnimInstance::StaticClass());
|
Super::SetAnimClass(USGVirtualHandAnimInstance::StaticClass());
|
||||||
|
|
||||||
bRight = true;
|
bRight = true;
|
||||||
|
|
||||||
|
DefaultFingertipsColliderSize = FVector{0.04f, 0.04f, 0.04f};
|
||||||
|
|
||||||
|
ThumbFingertipSocketName = FName(TEXT("ThumbFingertip"));
|
||||||
|
IndexFingertipSocketName = FName(TEXT("ThumbFingertip"));
|
||||||
|
MiddleFingertipSocketName = FName(TEXT("MiddleFingertip"));
|
||||||
|
|
||||||
bHiddenInGameIfNoGloveDetected = false;
|
bHiddenInGameIfNoGloveDetected = false;
|
||||||
|
|
||||||
DebugVirtualHandSettings = FSGDebugVirtualHandSettings{
|
DebugVirtualHandSettings = FSGDebugVirtualHandSettings{
|
||||||
ESGDebugVirtualHandDrawingMode::None,
|
ESGDebugVirtualHandDrawingMode::None,
|
||||||
FVector(0.5f, 0.5f, 0.5f),
|
FVector(0.5f, 0.5f, 0.5f),
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
#include "SenseGlove/GameFramework/SGPawn.h"
|
#include "SenseGlove/GameFramework/SGPawn.h"
|
||||||
|
|
||||||
#include "Camera/CameraComponent.h"
|
#include "Camera/CameraComponent.h"
|
||||||
|
#include "Components/SphereComponent.h"
|
||||||
|
|
||||||
#include "SenseGlove/Components/SGVirtualHandComponent.h"
|
#include "SenseGlove/Components/SGVirtualHandComponent.h"
|
||||||
#include "SenseGlove/Components/SGWristTrackerComponent.h"
|
#include "SenseGlove/Components/SGWristTrackerComponent.h"
|
||||||
@@ -99,6 +100,63 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
|||||||
false, nullptr, ETeleportType::None);
|
false, nullptr, ETeleportType::None);
|
||||||
HandLeft->SetWristTracker(WristTrackerLeft);
|
HandLeft->SetWristTracker(WristTrackerLeft);
|
||||||
|
|
||||||
|
LeftThumbFingertipCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||||
|
this, TEXT("LeftThumbFingertipCollider"));
|
||||||
|
LeftThumbFingertipCollider->SetRelativeScale3D(HandLeft->GetDefaultFingertipsColliderSize());
|
||||||
|
LeftThumbFingertipCollider->SetupAttachment(HandLeft, HandLeft->GetThumbFingertipSocketName());
|
||||||
|
LeftThumbFingertipCollider->SetCastShadow(false);
|
||||||
|
LeftThumbFingertipCollider->bCastDynamicShadow = false;
|
||||||
|
LeftThumbFingertipCollider->SetReceivesDecals(true);
|
||||||
|
LeftThumbFingertipCollider->SetCanEverAffectNavigation(false);
|
||||||
|
LeftThumbFingertipCollider->SetCollisionObjectType(ECC_WorldDynamic);
|
||||||
|
LeftThumbFingertipCollider->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
|
||||||
|
LeftThumbFingertipCollider->SetCollisionResponseToAllChannels(ECR_Overlap);
|
||||||
|
LeftThumbFingertipCollider->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Overlap);
|
||||||
|
LeftThumbFingertipCollider->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Overlap);
|
||||||
|
LeftThumbFingertipCollider->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
|
||||||
|
LeftThumbFingertipCollider->SetCollisionResponseToChannel(ECC_Visibility, ECR_Overlap);
|
||||||
|
LeftThumbFingertipCollider->SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Overlap);
|
||||||
|
LeftThumbFingertipCollider->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Overlap);
|
||||||
|
LeftThumbFingertipCollider->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap);
|
||||||
|
|
||||||
|
LeftIndexFingertipCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||||
|
this, TEXT("LeftIndexFingertipCollider"));
|
||||||
|
LeftIndexFingertipCollider->SetRelativeScale3D(HandLeft->GetDefaultFingertipsColliderSize());
|
||||||
|
LeftIndexFingertipCollider->SetupAttachment(HandLeft, HandLeft->GetIndexFingertipSocketName());
|
||||||
|
LeftIndexFingertipCollider->SetCastShadow(false);
|
||||||
|
LeftIndexFingertipCollider->bCastDynamicShadow = false;
|
||||||
|
LeftIndexFingertipCollider->SetReceivesDecals(true);
|
||||||
|
LeftIndexFingertipCollider->SetCanEverAffectNavigation(false);
|
||||||
|
LeftIndexFingertipCollider->SetCollisionObjectType(ECC_WorldDynamic);
|
||||||
|
LeftIndexFingertipCollider->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
|
||||||
|
LeftIndexFingertipCollider->SetCollisionResponseToAllChannels(ECR_Overlap);
|
||||||
|
LeftIndexFingertipCollider->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Overlap);
|
||||||
|
LeftIndexFingertipCollider->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Overlap);
|
||||||
|
LeftIndexFingertipCollider->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
|
||||||
|
LeftIndexFingertipCollider->SetCollisionResponseToChannel(ECC_Visibility, ECR_Overlap);
|
||||||
|
LeftIndexFingertipCollider->SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Overlap);
|
||||||
|
LeftIndexFingertipCollider->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Overlap);
|
||||||
|
LeftIndexFingertipCollider->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap);
|
||||||
|
|
||||||
|
LeftMiddleFingertipCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||||
|
this, TEXT("LeftMiddleFingertipCollider"));
|
||||||
|
LeftMiddleFingertipCollider->SetRelativeScale3D(HandLeft->GetDefaultFingertipsColliderSize());
|
||||||
|
LeftMiddleFingertipCollider->SetupAttachment(HandLeft, HandLeft->GetMiddleFingertipSocketName());
|
||||||
|
LeftMiddleFingertipCollider->SetCastShadow(false);
|
||||||
|
LeftMiddleFingertipCollider->bCastDynamicShadow = false;
|
||||||
|
LeftMiddleFingertipCollider->SetReceivesDecals(true);
|
||||||
|
LeftMiddleFingertipCollider->SetCanEverAffectNavigation(false);
|
||||||
|
LeftMiddleFingertipCollider->SetCollisionObjectType(ECC_WorldDynamic);
|
||||||
|
LeftMiddleFingertipCollider->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
|
||||||
|
LeftMiddleFingertipCollider->SetCollisionResponseToAllChannels(ECR_Overlap);
|
||||||
|
LeftMiddleFingertipCollider->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Overlap);
|
||||||
|
LeftMiddleFingertipCollider->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Overlap);
|
||||||
|
LeftMiddleFingertipCollider->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
|
||||||
|
LeftMiddleFingertipCollider->SetCollisionResponseToChannel(ECC_Visibility, ECR_Overlap);
|
||||||
|
LeftMiddleFingertipCollider->SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Overlap);
|
||||||
|
LeftMiddleFingertipCollider->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Overlap);
|
||||||
|
LeftMiddleFingertipCollider->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap);
|
||||||
|
|
||||||
WristTrackerRight = ObjectInitializer.CreateDefaultSubobject<USGWristTrackerComponent>(
|
WristTrackerRight = ObjectInitializer.CreateDefaultSubobject<USGWristTrackerComponent>(
|
||||||
this, TEXT("WristTrackerRight"));
|
this, TEXT("WristTrackerRight"));
|
||||||
WristTrackerRight->SetupAttachment(GetRootComponent());
|
WristTrackerRight->SetupAttachment(GetRootComponent());
|
||||||
@@ -113,6 +171,63 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
|||||||
HandRight->SetRelativeLocation(FVector{30.0f, 20.0f, -10.0f},
|
HandRight->SetRelativeLocation(FVector{30.0f, 20.0f, -10.0f},
|
||||||
false, nullptr, ETeleportType::None);
|
false, nullptr, ETeleportType::None);
|
||||||
HandRight->SetWristTracker(WristTrackerRight);
|
HandRight->SetWristTracker(WristTrackerRight);
|
||||||
|
|
||||||
|
RightThumbFingertipCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||||
|
this, TEXT("RightThumbFingertipCollider"));
|
||||||
|
RightThumbFingertipCollider->SetRelativeScale3D(HandLeft->GetDefaultFingertipsColliderSize());
|
||||||
|
RightThumbFingertipCollider->SetupAttachment(HandRight, HandRight->GetThumbFingertipSocketName());
|
||||||
|
RightThumbFingertipCollider->SetCastShadow(false);
|
||||||
|
RightThumbFingertipCollider->bCastDynamicShadow = false;
|
||||||
|
RightThumbFingertipCollider->SetReceivesDecals(true);
|
||||||
|
RightThumbFingertipCollider->SetCanEverAffectNavigation(false);
|
||||||
|
RightThumbFingertipCollider->SetCollisionObjectType(ECC_WorldDynamic);
|
||||||
|
RightThumbFingertipCollider->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
|
||||||
|
RightThumbFingertipCollider->SetCollisionResponseToAllChannels(ECR_Overlap);
|
||||||
|
RightThumbFingertipCollider->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Overlap);
|
||||||
|
RightThumbFingertipCollider->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Overlap);
|
||||||
|
RightThumbFingertipCollider->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
|
||||||
|
RightThumbFingertipCollider->SetCollisionResponseToChannel(ECC_Visibility, ECR_Overlap);
|
||||||
|
RightThumbFingertipCollider->SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Overlap);
|
||||||
|
RightThumbFingertipCollider->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Overlap);
|
||||||
|
RightThumbFingertipCollider->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap);
|
||||||
|
|
||||||
|
RightIndexFingertipCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||||
|
this, TEXT("RightIndexFingertipCollider"));
|
||||||
|
RightIndexFingertipCollider->SetRelativeScale3D(HandLeft->GetDefaultFingertipsColliderSize());
|
||||||
|
RightIndexFingertipCollider->SetupAttachment(HandRight, HandRight->GetIndexFingertipSocketName());
|
||||||
|
RightIndexFingertipCollider->SetCastShadow(false);
|
||||||
|
RightIndexFingertipCollider->bCastDynamicShadow = false;
|
||||||
|
RightIndexFingertipCollider->SetReceivesDecals(true);
|
||||||
|
RightIndexFingertipCollider->SetCanEverAffectNavigation(false);
|
||||||
|
RightIndexFingertipCollider->SetCollisionObjectType(ECC_WorldDynamic);
|
||||||
|
RightIndexFingertipCollider->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
|
||||||
|
RightIndexFingertipCollider->SetCollisionResponseToAllChannels(ECR_Overlap);
|
||||||
|
RightIndexFingertipCollider->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Overlap);
|
||||||
|
RightIndexFingertipCollider->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Overlap);
|
||||||
|
RightIndexFingertipCollider->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
|
||||||
|
RightIndexFingertipCollider->SetCollisionResponseToChannel(ECC_Visibility, ECR_Overlap);
|
||||||
|
RightIndexFingertipCollider->SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Overlap);
|
||||||
|
RightIndexFingertipCollider->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Overlap);
|
||||||
|
RightIndexFingertipCollider->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap);
|
||||||
|
|
||||||
|
RightMiddleFingertipCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||||
|
this, TEXT("RightMiddleFingertipCollider"));
|
||||||
|
RightMiddleFingertipCollider->SetRelativeScale3D(HandLeft->GetDefaultFingertipsColliderSize());
|
||||||
|
RightMiddleFingertipCollider->SetupAttachment(HandRight, HandRight->GetMiddleFingertipSocketName());
|
||||||
|
RightMiddleFingertipCollider->SetCastShadow(false);
|
||||||
|
RightMiddleFingertipCollider->bCastDynamicShadow = false;
|
||||||
|
RightMiddleFingertipCollider->SetReceivesDecals(true);
|
||||||
|
RightMiddleFingertipCollider->SetCanEverAffectNavigation(false);
|
||||||
|
RightMiddleFingertipCollider->SetCollisionObjectType(ECC_WorldDynamic);
|
||||||
|
RightMiddleFingertipCollider->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
|
||||||
|
RightMiddleFingertipCollider->SetCollisionResponseToAllChannels(ECR_Overlap);
|
||||||
|
RightMiddleFingertipCollider->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Overlap);
|
||||||
|
RightMiddleFingertipCollider->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Overlap);
|
||||||
|
RightMiddleFingertipCollider->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
|
||||||
|
RightMiddleFingertipCollider->SetCollisionResponseToChannel(ECC_Visibility, ECR_Overlap);
|
||||||
|
RightMiddleFingertipCollider->SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Overlap);
|
||||||
|
RightMiddleFingertipCollider->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Overlap);
|
||||||
|
RightMiddleFingertipCollider->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ASGPawn::BeginPlay()
|
void ASGPawn::BeginPlay()
|
||||||
|
|||||||
@@ -35,6 +35,8 @@
|
|||||||
|
|
||||||
#include "SenseGlove/GameFramework/SGVirtualHandActor.h"
|
#include "SenseGlove/GameFramework/SGVirtualHandActor.h"
|
||||||
|
|
||||||
|
#include "Components/SphereComponent.h"
|
||||||
|
|
||||||
#include "SenseGlove/Components/SGVirtualHandComponent.h"
|
#include "SenseGlove/Components/SGVirtualHandComponent.h"
|
||||||
#include "SenseGlove/Components/SGWristTrackerComponent.h"
|
#include "SenseGlove/Components/SGWristTrackerComponent.h"
|
||||||
|
|
||||||
@@ -79,6 +81,63 @@ ASGVirtualHandActor::ASGVirtualHandActor(const FObjectInitializer& ObjectInitial
|
|||||||
VirtualHand->SetRelativeRotation(FRotator{0.0f, -90.0f, 0.0f},
|
VirtualHand->SetRelativeRotation(FRotator{0.0f, -90.0f, 0.0f},
|
||||||
false, nullptr, ETeleportType::None);
|
false, nullptr, ETeleportType::None);
|
||||||
|
|
||||||
|
ThumbFingertipCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||||
|
this, TEXT("ThumbFingertipCollider"));
|
||||||
|
ThumbFingertipCollider->SetupAttachment(VirtualHand, VirtualHand->GetThumbFingertipSocketName());
|
||||||
|
ThumbFingertipCollider->SetRelativeScale3D(VirtualHand->GetDefaultFingertipsColliderSize());
|
||||||
|
ThumbFingertipCollider->SetCastShadow(false);
|
||||||
|
ThumbFingertipCollider->bCastDynamicShadow = false;
|
||||||
|
ThumbFingertipCollider->SetReceivesDecals(true);
|
||||||
|
ThumbFingertipCollider->SetCanEverAffectNavigation(false);
|
||||||
|
ThumbFingertipCollider->SetCollisionObjectType(ECC_WorldDynamic);
|
||||||
|
ThumbFingertipCollider->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
|
||||||
|
ThumbFingertipCollider->SetCollisionResponseToAllChannels(ECR_Overlap);
|
||||||
|
ThumbFingertipCollider->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Overlap);
|
||||||
|
ThumbFingertipCollider->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Overlap);
|
||||||
|
ThumbFingertipCollider->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
|
||||||
|
ThumbFingertipCollider->SetCollisionResponseToChannel(ECC_Visibility, ECR_Overlap);
|
||||||
|
ThumbFingertipCollider->SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Overlap);
|
||||||
|
ThumbFingertipCollider->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Overlap);
|
||||||
|
ThumbFingertipCollider->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap);
|
||||||
|
|
||||||
|
IndexFingertipCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||||
|
this, TEXT("IndexFingertipCollider"));
|
||||||
|
IndexFingertipCollider->SetRelativeScale3D(VirtualHand->GetDefaultFingertipsColliderSize());
|
||||||
|
IndexFingertipCollider->SetupAttachment(VirtualHand, VirtualHand->GetIndexFingertipSocketName());
|
||||||
|
IndexFingertipCollider->SetCastShadow(false);
|
||||||
|
IndexFingertipCollider->bCastDynamicShadow = false;
|
||||||
|
IndexFingertipCollider->SetReceivesDecals(true);
|
||||||
|
IndexFingertipCollider->SetCanEverAffectNavigation(false);
|
||||||
|
IndexFingertipCollider->SetCollisionObjectType(ECC_WorldDynamic);
|
||||||
|
IndexFingertipCollider->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
|
||||||
|
IndexFingertipCollider->SetCollisionResponseToAllChannels(ECR_Overlap);
|
||||||
|
IndexFingertipCollider->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Overlap);
|
||||||
|
IndexFingertipCollider->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Overlap);
|
||||||
|
IndexFingertipCollider->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
|
||||||
|
IndexFingertipCollider->SetCollisionResponseToChannel(ECC_Visibility, ECR_Overlap);
|
||||||
|
IndexFingertipCollider->SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Overlap);
|
||||||
|
IndexFingertipCollider->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Overlap);
|
||||||
|
IndexFingertipCollider->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap);
|
||||||
|
|
||||||
|
MiddleFingertipCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||||
|
this, TEXT("MiddleFingertipCollider"));
|
||||||
|
MiddleFingertipCollider->SetRelativeScale3D(VirtualHand->GetDefaultFingertipsColliderSize());
|
||||||
|
MiddleFingertipCollider->SetupAttachment(VirtualHand, VirtualHand->GetMiddleFingertipSocketName());
|
||||||
|
MiddleFingertipCollider->SetCastShadow(false);
|
||||||
|
MiddleFingertipCollider->bCastDynamicShadow = false;
|
||||||
|
MiddleFingertipCollider->SetReceivesDecals(true);
|
||||||
|
MiddleFingertipCollider->SetCanEverAffectNavigation(false);
|
||||||
|
MiddleFingertipCollider->SetCollisionObjectType(ECC_WorldDynamic);
|
||||||
|
MiddleFingertipCollider->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
|
||||||
|
MiddleFingertipCollider->SetCollisionResponseToAllChannels(ECR_Overlap);
|
||||||
|
MiddleFingertipCollider->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Overlap);
|
||||||
|
MiddleFingertipCollider->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Overlap);
|
||||||
|
MiddleFingertipCollider->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
|
||||||
|
MiddleFingertipCollider->SetCollisionResponseToChannel(ECC_Visibility, ECR_Overlap);
|
||||||
|
MiddleFingertipCollider->SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Overlap);
|
||||||
|
MiddleFingertipCollider->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Overlap);
|
||||||
|
MiddleFingertipCollider->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap);
|
||||||
|
|
||||||
WristTracker = CreateDefaultSubobject<USGWristTrackerComponent>(TEXT("WristTracker"));
|
WristTracker = CreateDefaultSubobject<USGWristTrackerComponent>(TEXT("WristTracker"));
|
||||||
WristTracker->SetupAttachment(RootComponent);
|
WristTracker->SetupAttachment(RootComponent);
|
||||||
|
|
||||||
|
|||||||
@@ -49,6 +49,7 @@
|
|||||||
|
|
||||||
#include "SGVirtualHandComponent.generated.h"
|
#include "SGVirtualHandComponent.generated.h"
|
||||||
|
|
||||||
|
class USphereComponent;
|
||||||
class USkeletalMesh;
|
class USkeletalMesh;
|
||||||
|
|
||||||
class USGHandPose;
|
class USGHandPose;
|
||||||
@@ -83,6 +84,18 @@ private:
|
|||||||
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
uint8 bRight : 1;
|
uint8 bRight : 1;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
|
FVector DefaultFingertipsColliderSize;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
|
FName ThumbFingertipSocketName;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
|
FName IndexFingertipSocketName;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
|
FName MiddleFingertipSocketName;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
uint8 bHiddenInGameIfNoGloveDetected : 1;
|
uint8 bHiddenInGameIfNoGloveDetected : 1;
|
||||||
|
|
||||||
@@ -113,6 +126,41 @@ public:
|
|||||||
|
|
||||||
void SetRight(const bool bInRight);
|
void SetRight(const bool bInRight);
|
||||||
|
|
||||||
|
FORCEINLINE const FVector& GetDefaultFingertipsColliderSize() const
|
||||||
|
{
|
||||||
|
return DefaultFingertipsColliderSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
FORCEINLINE const FName& GetThumbFingertipSocketName() const
|
||||||
|
{
|
||||||
|
return ThumbFingertipSocketName;
|
||||||
|
}
|
||||||
|
|
||||||
|
FORCEINLINE void SetThumbFingertipSocketName(const FName& SocketName)
|
||||||
|
{
|
||||||
|
ThumbFingertipSocketName = SocketName;
|
||||||
|
}
|
||||||
|
|
||||||
|
FORCEINLINE const FName& GetIndexFingertipSocketName() const
|
||||||
|
{
|
||||||
|
return IndexFingertipSocketName;
|
||||||
|
}
|
||||||
|
|
||||||
|
FORCEINLINE void SetIndexFingertipSocketName(const FName& SocketName)
|
||||||
|
{
|
||||||
|
IndexFingertipSocketName = SocketName;
|
||||||
|
}
|
||||||
|
|
||||||
|
FORCEINLINE const FName& GetMiddleFingertipSocketName() const
|
||||||
|
{
|
||||||
|
return MiddleFingertipSocketName;
|
||||||
|
}
|
||||||
|
|
||||||
|
FORCEINLINE void SetMiddleFingertipSocketName(const FName& SocketName)
|
||||||
|
{
|
||||||
|
MiddleFingertipSocketName = SocketName;
|
||||||
|
}
|
||||||
|
|
||||||
FORCEINLINE bool IsHiddenInGameIfNoGloveDetected() const
|
FORCEINLINE bool IsHiddenInGameIfNoGloveDetected() const
|
||||||
{
|
{
|
||||||
return !!bHiddenInGameIfNoGloveDetected;
|
return !!bHiddenInGameIfNoGloveDetected;
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
#include "SGPawn.generated.h"
|
#include "SGPawn.generated.h"
|
||||||
|
|
||||||
class UCameraComponent;
|
class UCameraComponent;
|
||||||
|
class USphereComponent;
|
||||||
|
|
||||||
class USGVirtualHandComponent;
|
class USGVirtualHandComponent;
|
||||||
class USGWristTrackerComponent;
|
class USGWristTrackerComponent;
|
||||||
@@ -71,15 +72,33 @@ private:
|
|||||||
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
USGWristTrackerComponent* WristTrackerLeft;
|
USGWristTrackerComponent* WristTrackerLeft;
|
||||||
|
|
||||||
|
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
|
USGVirtualHandComponent* HandLeft;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
|
USphereComponent* LeftThumbFingertipCollider;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
|
USphereComponent* LeftIndexFingertipCollider;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
|
USphereComponent* LeftMiddleFingertipCollider;
|
||||||
|
|
||||||
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
USGWristTrackerComponent* WristTrackerRight;
|
USGWristTrackerComponent* WristTrackerRight;
|
||||||
|
|
||||||
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
|
||||||
USGVirtualHandComponent* HandLeft;
|
|
||||||
|
|
||||||
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
USGVirtualHandComponent* HandRight;
|
USGVirtualHandComponent* HandRight;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
|
USphereComponent* RightThumbFingertipCollider;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
|
USphereComponent* RightIndexFingertipCollider;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
|
USphereComponent* RightMiddleFingertipCollider;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FORCEINLINE UCameraComponent* GetCamera() const
|
FORCEINLINE UCameraComponent* GetCamera() const
|
||||||
{
|
{
|
||||||
@@ -91,21 +110,51 @@ public:
|
|||||||
return WristTrackerLeft;
|
return WristTrackerLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
FORCEINLINE USGWristTrackerComponent* GetWristTrackerRight() const
|
|
||||||
{
|
|
||||||
return WristTrackerRight;
|
|
||||||
}
|
|
||||||
|
|
||||||
FORCEINLINE USGVirtualHandComponent* GetHandLeft() const
|
FORCEINLINE USGVirtualHandComponent* GetHandLeft() const
|
||||||
{
|
{
|
||||||
return HandLeft;
|
return HandLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FORCEINLINE USphereComponent* GetLeftThumbFingertipCollider() const
|
||||||
|
{
|
||||||
|
return LeftThumbFingertipCollider;
|
||||||
|
}
|
||||||
|
|
||||||
|
FORCEINLINE USphereComponent* GetLeftIndexFingertipCollider() const
|
||||||
|
{
|
||||||
|
return LeftIndexFingertipCollider;
|
||||||
|
}
|
||||||
|
|
||||||
|
FORCEINLINE USphereComponent* GetLeftMiddleFingertipCollider() const
|
||||||
|
{
|
||||||
|
return LeftMiddleFingertipCollider;
|
||||||
|
}
|
||||||
|
|
||||||
|
FORCEINLINE USGWristTrackerComponent* GetWristTrackerRight() const
|
||||||
|
{
|
||||||
|
return WristTrackerRight;
|
||||||
|
}
|
||||||
|
|
||||||
FORCEINLINE USGVirtualHandComponent* GetHandRight() const
|
FORCEINLINE USGVirtualHandComponent* GetHandRight() const
|
||||||
{
|
{
|
||||||
return HandRight;
|
return HandRight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FORCEINLINE USphereComponent* GetRightThumbFingertipCollider() const
|
||||||
|
{
|
||||||
|
return RightThumbFingertipCollider;
|
||||||
|
}
|
||||||
|
|
||||||
|
FORCEINLINE USphereComponent* GetRightIndexFingertipCollider() const
|
||||||
|
{
|
||||||
|
return RightIndexFingertipCollider;
|
||||||
|
}
|
||||||
|
|
||||||
|
FORCEINLINE USphereComponent* GetRightMiddleFingertipCollider() const
|
||||||
|
{
|
||||||
|
return RightMiddleFingertipCollider;
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
virtual void PreInitializeComponents() override;
|
virtual void PreInitializeComponents() override;
|
||||||
|
|||||||
@@ -43,9 +43,10 @@
|
|||||||
|
|
||||||
#include "SGVirtualHandActor.generated.h"
|
#include "SGVirtualHandActor.generated.h"
|
||||||
|
|
||||||
|
class USceneComponent;
|
||||||
class USkeletalMesh;
|
class USkeletalMesh;
|
||||||
class USkeleton;
|
class USkeleton;
|
||||||
class USceneComponent;
|
class USphereComponent;
|
||||||
|
|
||||||
class USGHandPose;
|
class USGHandPose;
|
||||||
class USGVirtualHandComponent;
|
class USGVirtualHandComponent;
|
||||||
@@ -77,6 +78,15 @@ private:
|
|||||||
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
USGVirtualHandComponent* VirtualHand;
|
USGVirtualHandComponent* VirtualHand;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
|
USphereComponent* ThumbFingertipCollider;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
|
USphereComponent* IndexFingertipCollider;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
|
USphereComponent* MiddleFingertipCollider;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FORCEINLINE USGWristTrackerComponent* GetWristTracker() const
|
FORCEINLINE USGWristTrackerComponent* GetWristTracker() const
|
||||||
{
|
{
|
||||||
@@ -88,6 +98,21 @@ public:
|
|||||||
return VirtualHand;
|
return VirtualHand;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FORCEINLINE USphereComponent* GetThumbFingertipCollider() const
|
||||||
|
{
|
||||||
|
return ThumbFingertipCollider;
|
||||||
|
}
|
||||||
|
|
||||||
|
FORCEINLINE USphereComponent* GetIndexFingertipCollider() const
|
||||||
|
{
|
||||||
|
return IndexFingertipCollider;
|
||||||
|
}
|
||||||
|
|
||||||
|
FORCEINLINE USphereComponent* GetMiddleFingertipCollider() const
|
||||||
|
{
|
||||||
|
return MiddleFingertipCollider;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
FORCEINLINE void SetMesh(USGVirtualHandComponent* InVirtualHand)
|
FORCEINLINE void SetMesh(USGVirtualHandComponent* InVirtualHand)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
#include "SGKismet/SGPawnKismetLibrary.h"
|
#include "SGKismet/SGPawnKismetLibrary.h"
|
||||||
|
|
||||||
#include "Camera/CameraComponent.h"
|
#include "Camera/CameraComponent.h"
|
||||||
|
#include "Components/SphereComponent.h"
|
||||||
|
|
||||||
#include "SenseGlove/Components/SGVirtualHandComponent.h"
|
#include "SenseGlove/Components/SGVirtualHandComponent.h"
|
||||||
#include "SenseGlove/Components/SGWristTrackerComponent.h"
|
#include "SenseGlove/Components/SGWristTrackerComponent.h"
|
||||||
@@ -51,17 +52,47 @@ USGWristTrackerComponent* UPawnKismetLibrary::GetWristTrackerLeft(const ASGPawn*
|
|||||||
return Pawn->GetWristTrackerLeft();
|
return Pawn->GetWristTrackerLeft();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGWristTrackerComponent* UPawnKismetLibrary::GetWristTrackerRight(const ASGPawn* Pawn)
|
|
||||||
{
|
|
||||||
return Pawn->GetWristTrackerRight();
|
|
||||||
}
|
|
||||||
|
|
||||||
USGVirtualHandComponent* UPawnKismetLibrary::GetHandLeft(const ASGPawn* Pawn)
|
USGVirtualHandComponent* UPawnKismetLibrary::GetHandLeft(const ASGPawn* Pawn)
|
||||||
{
|
{
|
||||||
return Pawn->GetHandLeft();
|
return Pawn->GetHandLeft();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
USphereComponent* UPawnKismetLibrary::GetLeftThumbFingertipCollider(const ASGPawn* Pawn)
|
||||||
|
{
|
||||||
|
return Pawn->GetLeftThumbFingertipCollider();
|
||||||
|
}
|
||||||
|
|
||||||
|
USphereComponent* UPawnKismetLibrary::GetLeftIndexFingertipCollider(const ASGPawn* Pawn)
|
||||||
|
{
|
||||||
|
return Pawn->GetLeftIndexFingertipCollider();
|
||||||
|
}
|
||||||
|
|
||||||
|
USphereComponent* UPawnKismetLibrary::GetLeftMiddleFingertipCollider(const ASGPawn* Pawn)
|
||||||
|
{
|
||||||
|
return Pawn->GetLeftMiddleFingertipCollider();
|
||||||
|
}
|
||||||
|
|
||||||
|
USGWristTrackerComponent* UPawnKismetLibrary::GetWristTrackerRight(const ASGPawn* Pawn)
|
||||||
|
{
|
||||||
|
return Pawn->GetWristTrackerRight();
|
||||||
|
}
|
||||||
|
|
||||||
USGVirtualHandComponent* UPawnKismetLibrary::GetHandRight(const ASGPawn* Pawn)
|
USGVirtualHandComponent* UPawnKismetLibrary::GetHandRight(const ASGPawn* Pawn)
|
||||||
{
|
{
|
||||||
return Pawn->GetHandRight();
|
return Pawn->GetHandRight();
|
||||||
|
}
|
||||||
|
|
||||||
|
USphereComponent* UPawnKismetLibrary::GetRightThumbFingertipCollider(const ASGPawn* Pawn)
|
||||||
|
{
|
||||||
|
return Pawn->GetRightThumbFingertipCollider();
|
||||||
|
}
|
||||||
|
|
||||||
|
USphereComponent* UPawnKismetLibrary::GetRightIndexFingertipCollider(const ASGPawn* Pawn)
|
||||||
|
{
|
||||||
|
return Pawn->GetRightIndexFingertipCollider();
|
||||||
|
}
|
||||||
|
|
||||||
|
USphereComponent* UPawnKismetLibrary::GetRightMiddleFingertipCollider(const ASGPawn* Pawn)
|
||||||
|
{
|
||||||
|
return Pawn->GetRightMiddleFingertipCollider();
|
||||||
}
|
}
|
||||||
@@ -35,18 +35,38 @@
|
|||||||
|
|
||||||
#include "SGKismet/SGVirtualHandActorKismetLibrary.h"
|
#include "SGKismet/SGVirtualHandActorKismetLibrary.h"
|
||||||
|
|
||||||
|
#include "Components/SphereComponent.h"
|
||||||
|
|
||||||
#include "SenseGlove/Components/SGVirtualHandComponent.h"
|
#include "SenseGlove/Components/SGVirtualHandComponent.h"
|
||||||
#include "SenseGlove/Components/SGWristTrackerComponent.h"
|
#include "SenseGlove/Components/SGWristTrackerComponent.h"
|
||||||
#include "SenseGlove/GameFramework/SGVirtualHandActor.h"
|
#include "SenseGlove/GameFramework/SGVirtualHandActor.h"
|
||||||
|
|
||||||
|
USGWristTrackerComponent* UVirtualHandActorKismetLibrary::GetWristTracker(const ASGVirtualHandActor* VirtualHandActor)
|
||||||
|
{
|
||||||
|
return VirtualHandActor->GetWristTracker();
|
||||||
|
}
|
||||||
|
|
||||||
USGVirtualHandComponent* UVirtualHandActorKismetLibrary::GetVirtualHand(const ASGVirtualHandActor* VirtualHandActor)
|
USGVirtualHandComponent* UVirtualHandActorKismetLibrary::GetVirtualHand(const ASGVirtualHandActor* VirtualHandActor)
|
||||||
{
|
{
|
||||||
return VirtualHandActor->GetVirtualHand();
|
return VirtualHandActor->GetVirtualHand();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGWristTrackerComponent* UVirtualHandActorKismetLibrary::GetWristTracker(const ASGVirtualHandActor* VirtualHandActor)
|
USphereComponent* UVirtualHandActorKismetLibrary::GetThumbFingertipCollider(
|
||||||
|
const ASGVirtualHandActor* VirtualHandActor)
|
||||||
{
|
{
|
||||||
return VirtualHandActor->GetWristTracker();
|
return VirtualHandActor->GetThumbFingertipCollider();
|
||||||
|
}
|
||||||
|
|
||||||
|
USphereComponent* UVirtualHandActorKismetLibrary::GetIndexFingertipCollider(
|
||||||
|
const ASGVirtualHandActor* VirtualHandActor)
|
||||||
|
{
|
||||||
|
return VirtualHandActor->GetIndexFingertipCollider();
|
||||||
|
}
|
||||||
|
|
||||||
|
USphereComponent* UVirtualHandActorKismetLibrary::GetMiddleFingertipCollider(
|
||||||
|
const ASGVirtualHandActor* VirtualHandActor)
|
||||||
|
{
|
||||||
|
return VirtualHandActor->GetMiddleFingertipCollider();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UVirtualHandActorKismetLibrary::IsLeft(const ASGVirtualHandActor* VirtualHandActor)
|
bool UVirtualHandActorKismetLibrary::IsLeft(const ASGVirtualHandActor* VirtualHandActor)
|
||||||
|
|||||||
@@ -77,6 +77,48 @@ void UVirtualHandComponentKismetLibrary::SetRight(USGVirtualHandComponent* Virtu
|
|||||||
VirtualHandComponent->SetRight(bInRight);
|
VirtualHandComponent->SetRight(bInRight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const FVector& UVirtualHandComponentKismetLibrary::GetDefaultFingertipsColliderSize(
|
||||||
|
const USGVirtualHandComponent* VirtualHandComponent)
|
||||||
|
{
|
||||||
|
return VirtualHandComponent->GetDefaultFingertipsColliderSize();
|
||||||
|
}
|
||||||
|
|
||||||
|
const FName& UVirtualHandComponentKismetLibrary::GetThumbFingertipSocketName(
|
||||||
|
const USGVirtualHandComponent* VirtualHandComponent)
|
||||||
|
{
|
||||||
|
return VirtualHandComponent->GetThumbFingertipSocketName();
|
||||||
|
}
|
||||||
|
|
||||||
|
void UVirtualHandComponentKismetLibrary::SetThumbFingertipSocketName(USGVirtualHandComponent* VirtualHandComponent,
|
||||||
|
const FName& SocketName)
|
||||||
|
{
|
||||||
|
VirtualHandComponent->SetThumbFingertipSocketName(SocketName);
|
||||||
|
}
|
||||||
|
|
||||||
|
const FName& UVirtualHandComponentKismetLibrary::GetIndexFingertipSocketName(
|
||||||
|
const USGVirtualHandComponent* VirtualHandComponent)
|
||||||
|
{
|
||||||
|
return VirtualHandComponent->GetIndexFingertipSocketName();
|
||||||
|
}
|
||||||
|
|
||||||
|
void UVirtualHandComponentKismetLibrary::SetIndexFingertipSocketName(USGVirtualHandComponent* VirtualHandComponent,
|
||||||
|
const FName& SocketName)
|
||||||
|
{
|
||||||
|
VirtualHandComponent->SetIndexFingertipSocketName(SocketName);
|
||||||
|
}
|
||||||
|
|
||||||
|
const FName& UVirtualHandComponentKismetLibrary::GetMiddleFingertipSocketName(
|
||||||
|
const USGVirtualHandComponent* VirtualHandComponent)
|
||||||
|
{
|
||||||
|
return VirtualHandComponent->GetMiddleFingertipSocketName();
|
||||||
|
}
|
||||||
|
|
||||||
|
void UVirtualHandComponentKismetLibrary::SetMiddleFingertipSocketName(USGVirtualHandComponent* VirtualHandComponent,
|
||||||
|
const FName& SocketName)
|
||||||
|
{
|
||||||
|
VirtualHandComponent->SetMiddleFingertipSocketName(SocketName);
|
||||||
|
}
|
||||||
|
|
||||||
bool UVirtualHandComponentKismetLibrary::IsHiddenInGameIfNoGloveDetected(
|
bool UVirtualHandComponentKismetLibrary::IsHiddenInGameIfNoGloveDetected(
|
||||||
const USGVirtualHandComponent* VirtualHandComponent)
|
const USGVirtualHandComponent* VirtualHandComponent)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -50,6 +50,7 @@
|
|||||||
#include "SGPawnKismetLibrary.generated.h"
|
#include "SGPawnKismetLibrary.generated.h"
|
||||||
|
|
||||||
class UCameraComponent;
|
class UCameraComponent;
|
||||||
|
class USphereComponent;
|
||||||
|
|
||||||
class ASGPawn;
|
class ASGPawn;
|
||||||
class USGVirtualHandComponent;
|
class USGVirtualHandComponent;
|
||||||
@@ -67,12 +68,30 @@ public:
|
|||||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
|
||||||
static USGWristTrackerComponent* GetWristTrackerLeft(const ASGPawn* Pawn);
|
static USGWristTrackerComponent* GetWristTrackerLeft(const ASGPawn* Pawn);
|
||||||
|
|
||||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
|
|
||||||
static USGWristTrackerComponent* GetWristTrackerRight(const ASGPawn* Pawn);
|
|
||||||
|
|
||||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
|
||||||
static USGVirtualHandComponent* GetHandLeft(const ASGPawn* Pawn);
|
static USGVirtualHandComponent* GetHandLeft(const ASGPawn* Pawn);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
|
||||||
|
static USphereComponent* GetLeftThumbFingertipCollider(const ASGPawn* Pawn);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
|
||||||
|
static USphereComponent* GetLeftIndexFingertipCollider(const ASGPawn* Pawn);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
|
||||||
|
static USphereComponent* GetLeftMiddleFingertipCollider(const ASGPawn* Pawn);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
|
||||||
|
static USGWristTrackerComponent* GetWristTrackerRight(const ASGPawn* Pawn);
|
||||||
|
|
||||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
|
||||||
static USGVirtualHandComponent* GetHandRight(const ASGPawn* Pawn);
|
static USGVirtualHandComponent* GetHandRight(const ASGPawn* Pawn);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
|
||||||
|
static USphereComponent* GetRightThumbFingertipCollider(const ASGPawn* Pawn);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
|
||||||
|
static USphereComponent* GetRightIndexFingertipCollider(const ASGPawn* Pawn);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
|
||||||
|
static USphereComponent* GetRightMiddleFingertipCollider(const ASGPawn* Pawn);
|
||||||
};
|
};
|
||||||
@@ -41,6 +41,8 @@
|
|||||||
|
|
||||||
#include "SGVirtualHandActorKismetLibrary.generated.h"
|
#include "SGVirtualHandActorKismetLibrary.generated.h"
|
||||||
|
|
||||||
|
class USphereComponent;
|
||||||
|
|
||||||
class ASGVirtualHandActor;
|
class ASGVirtualHandActor;
|
||||||
class USGVirtualHandComponent;
|
class USGVirtualHandComponent;
|
||||||
class USGWristTrackerComponent;
|
class USGWristTrackerComponent;
|
||||||
@@ -51,11 +53,20 @@ class SENSEGLOVEKISMET_API UVirtualHandActorKismetLibrary final : public USGBlue
|
|||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Virtual Hand")
|
||||||
|
static USGWristTrackerComponent* GetWristTracker(const ASGVirtualHandActor* VirtualHandActor);
|
||||||
|
|
||||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Virtual Hand")
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Virtual Hand")
|
||||||
static USGVirtualHandComponent* GetVirtualHand(const ASGVirtualHandActor* VirtualHandActor);
|
static USGVirtualHandComponent* GetVirtualHand(const ASGVirtualHandActor* VirtualHandActor);
|
||||||
|
|
||||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Virtual Hand")
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Virtual Hand")
|
||||||
static USGWristTrackerComponent* GetWristTracker(const ASGVirtualHandActor* VirtualHandActor);
|
static USphereComponent* GetThumbFingertipCollider(const ASGVirtualHandActor* VirtualHandActor);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Virtual Hand")
|
||||||
|
static USphereComponent* GetIndexFingertipCollider(const ASGVirtualHandActor* VirtualHandActor);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Virtual Hand")
|
||||||
|
static USphereComponent* GetMiddleFingertipCollider(const ASGVirtualHandActor* VirtualHandActor);
|
||||||
|
|
||||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Virtual Hand")
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Virtual Hand")
|
||||||
static bool IsLeft(const ASGVirtualHandActor* VirtualHandActor);
|
static bool IsLeft(const ASGVirtualHandActor* VirtualHandActor);
|
||||||
|
|||||||
@@ -80,6 +80,30 @@ public:
|
|||||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
||||||
static void SetRight(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent, bool bInRight);
|
static void SetRight(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent, bool bInRight);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||||
|
static const FVector& GetDefaultFingertipsColliderSize(const USGVirtualHandComponent* VirtualHandComponent);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||||
|
static const FName& GetThumbFingertipSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
||||||
|
static void SetThumbFingertipSocketName(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
||||||
|
const FName& SocketName);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||||
|
static const FName& GetIndexFingertipSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
||||||
|
static void SetIndexFingertipSocketName(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
||||||
|
const FName& SocketName);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||||
|
static const FName& GetMiddleFingertipSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
||||||
|
static void SetMiddleFingertipSocketName(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
||||||
|
const FName& SocketName);
|
||||||
|
|
||||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||||
static bool IsHiddenInGameIfNoGloveDetected(const USGVirtualHandComponent* VirtualHandComponent);
|
static bool IsHiddenInGameIfNoGloveDetected(const USGVirtualHandComponent* VirtualHandComponent);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user