Skip to content
Snippets Groups Projects
Commit 072ee57e authored by David Gilbert's avatar David Gilbert :bug:
Browse files

Replaced UniversalTrackedComponents with MotionControllers and set the...

Replaced UniversalTrackedComponents with MotionControllers and set the livelink subjects on construction in the blueprint for now.
parent d63d3650
No related branches found
No related tags found
1 merge request!30Replace LiveLink UniversalTrackedComponent implementation by MotionControllers
No preview for this file type
No preview for this file type
......@@ -27,31 +27,22 @@ AVirtualRealityPawn::AVirtualRealityPawn(const FObjectInitializer& ObjectInitial
CameraComponent->SetupAttachment(RootComponent);
CameraComponent->SetRelativeLocation(FVector(0.0f, 0.0f, BaseEyeHeight)); //so it is rendered correctly in editor
Head = CreateDefaultSubobject<UUniversalTrackedComponent>(TEXT("Head"));
Head->ProxyType = ETrackedComponentType::TCT_HEAD;
Head->SetupAttachment(RootComponent);
CapsuleRotationFix = CreateDefaultSubobject<USceneComponent>(TEXT("CapsuleRotationFix"));
CapsuleRotationFix->SetUsingAbsoluteRotation(true);
CapsuleRotationFix->SetupAttachment(Head);
Head = CreateDefaultSubobject<UMotionControllerComponent>(TEXT("Head MCC"));
Head->SetRelativeLocation(FVector(0.0f, 0.0f, 0.0f));
Head->SetupAttachment(CameraComponent);
PawnMovement = CreateDefaultSubobject<UVRPawnMovement>(TEXT("Pawn Movement"));
PawnMovement->SetUpdatedComponent(RootComponent);
PawnMovement->SetHeadComponent(CapsuleRotationFix);
PawnMovement->SetHeadComponent(Head);
RightHand = CreateDefaultSubobject<UUniversalTrackedComponent>(TEXT("Right Hand"));
RightHand->ProxyType = ETrackedComponentType::TCT_RIGHT_HAND;
RightHand->AttachementType = EAttachementType::AT_FLYSTICK;
RightHand = CreateDefaultSubobject<UMotionControllerComponent>(TEXT("Right Hand MCC"));
RightHand->SetupAttachment(RootComponent);
LeftHand = CreateDefaultSubobject<UUniversalTrackedComponent>(TEXT("Left Hand"));
LeftHand->ProxyType = ETrackedComponentType::TCT_LEFT_HAND;
LeftHand->AttachementType = EAttachementType::AT_HANDTARGET;
LeftHand = CreateDefaultSubobject<UMotionControllerComponent>(TEXT("Left Hand MCC"));
LeftHand->SetupAttachment(RootComponent);
BasicVRInteraction = CreateDefaultSubobject<UBasicVRInteractionComponent>(TEXT("Basic VR Interaction"));
BasicVRInteraction->Initialize(RightHand);
}
void AVirtualRealityPawn::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
......@@ -75,7 +66,6 @@ void AVirtualRealityPawn::SetupPlayerInputComponent(UInputComponent* PlayerInput
EI->BindAction(Fire, ETriggerEvent::Completed, this, &AVirtualRealityPawn::OnEndFire);
EI->BindAction(ToggleNavigationMode,ETriggerEvent::Started,this,&AVirtualRealityPawn::OnToggleNavigationMode);
}
// legacy grabbing
......
......@@ -89,10 +89,10 @@ public:
private:
UPROPERTY()
UUniversalTrackedComponent* MovementHand;
UMotionControllerComponent* MovementHand;
UPROPERTY()
UUniversalTrackedComponent* RotationHand;
UMotionControllerComponent* RotationHand;
UPROPERTY()
class UInputMappingContext* IMCMovement;
......
......@@ -117,10 +117,10 @@ public:
private:
UPROPERTY()
UUniversalTrackedComponent* TeleportationHand;
UMotionControllerComponent* TeleportationHand;
UPROPERTY()
UUniversalTrackedComponent* RotationHand;
UMotionControllerComponent* RotationHand;
UPROPERTY()
class UInputMappingContext* IMCMovement;
......
......@@ -24,13 +24,13 @@ public:
/* Proxy */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pawn|Proxy Objects")
UUniversalTrackedComponent* Head;
UMotionControllerComponent* Head;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pawn|Proxy Objects")
UUniversalTrackedComponent* RightHand;
UMotionControllerComponent* RightHand;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pawn|Proxy Objects")
UUniversalTrackedComponent* LeftHand;
UMotionControllerComponent* LeftHand;
/* Interaction */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pawn|Interaction")
......@@ -40,11 +40,6 @@ public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pawn|Movement")
UVRPawnMovement* PawnMovement;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pawn|Movement")
USceneComponent* CapsuleRotationFix;
/* CameraComponent */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pawn|Camera")
UCameraComponent* CameraComponent;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment