12 : Super(ObjectInitializer)
14 PrimaryComponentTick.bCanEverTick =
true;
15 PrimaryComponentTick.bStartWithTickEnabled =
true;
19 bWantsInitializeComponent =
true;
21 SetRelativeScale3D(FVector(1.0f, 1.0f, 1.0f));
22 SetRelativeLocation(FVector::ZeroVector);
46 Super::InitializeComponent();
51 SetRelativeTransform(
AttachChar->VRReplicatedCamera->GetRelativeTransform());
58 if (
AVRCharacter* CharacterOwner = Cast<AVRCharacter>(this->GetOwner()))
67 if (
AVRBaseCharacter * BaseCharacterOwner = Cast<AVRBaseCharacter>(this->GetOwner()))
76 Super::OnAttachmentChanged();
88 TrackedParentWaist.SetTranslation(TrackedParentWaist.GetTranslation() * FVector(1.0f, 1.0f, 0.0f));
99 SetRelativeTransform(TrackedParentWaist);
106 else if (
IsLocallyControlled() && GEngine->XRSystem.IsValid() && GEngine->XRSystem->IsHeadTrackingAllowed())
109 FVector curCameraLoc;
110 if (GEngine->XRSystem->GetCurrentPose(IXRTrackingSystem::HMDDeviceId, curRot, curCameraLoc))
140 else if (
AActor* owner = this->GetOwner())
164 if (!CharMove || !CharMove->IsComponentTickEnabled() || !CharMove->IsActive())
171 Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
static FTransform Default_GetWaistOrientationAndPosition(FBPVRWaistTracking_Info &WaistTrackingInfo)
TWeakObjectPtr< AVRCharacter > AttachChar
UPROPERTY()
virtual void InitializeComponent() override
void UpdateTracking(float DeltaTime)
void SetRelativeRotAndLoc(FVector NewRelativeLocation, FRotator NewRelativeRotation, float DeltaTime)
void TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override
virtual void OnAttachmentChanged() override
TWeakObjectPtr< AVRBaseCharacter > AttachBaseChar
UPROPERTY()
FBPVRWaistTracking_Info OptionalWaistTrackingParent
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRTrackedParentInterface")
bool bUseFeetLocation
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRExpansionLibrary")
FVector CustomOffset
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRExpansionLibrary")
bool bOffsetByHMD
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRExpansionLibrary")
UParentRelativeAttachmentComponent(const FObjectInitializer &ObjectInitializer)
bool bIgnoreRotationFromParent
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRExpansionLibrary")
FTransform LeftControllerTrans
bool bUpdateInCharacterMovement
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRExpansionLibrary")
FTransform RightControllerTrans
bool bLerpTransition
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRExpansionLibrary")
float YawTolerance
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRExpansionLibrary", meta = (ClampMin = "0",...
bool IsLocallyControlled() const
FQuat GetCalculatedRotation(FRotator InverseRot, float DeltaTime)
float LerpSpeed
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRExpansionLibrary", meta = (ClampMin = "0",...
static FRotator GetHMDPureYaw(FRotator HMDRotation)
UFUNCTION(BlueprintPure, Category = "VRExpansionFunctions", meta = (bIgnoreSelf = "true",...
static FRotator GetHMDPureYaw_I(FRotator HMDRotation)