17 bool bHasValidBaseTransform;
18 FTransform BaseTransform;
20 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Settings")
21 uint32 bLimitsInLocalSpace : 1;
23 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Settings")
24 uint32 bGetInitialPositionsOnBeginPlay : 1;
26 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Settings|Linear")
29 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Settings|Linear")
32 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Settings|Linear")
35 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Settings|Angular")
36 uint32 bLimitPitch : 1;
38 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Settings|Angular")
41 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Settings|Angular")
42 uint32 bLimitRoll : 1;
44 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Settings|Angular")
45 uint32 bIgnoreHandRotation : 1;
47 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Settings|Linear", meta = (editcondition = "!bGetInitialPositionsOnBeginPlay"))
48 FVector_NetQuantize100 InitialLinearTranslation;
50 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Settings|Linear")
51 FVector_NetQuantize100 MinLinearTranslation;
53 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Settings|Linear")
54 FVector_NetQuantize100 MaxLinearTranslation;
56 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Settings|Angular", meta = (editcondition = "!bGetInitialPositionsOnBeginPlay"))
57 FRotator InitialAngularTranslation;
59 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Settings|Angular")
60 FRotator MinAngularTranslation;
62 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Settings|Angular")
63 FRotator MaxAngularTranslation;
66 bLimitsInLocalSpace(true),
67 bGetInitialPositionsOnBeginPlay(true),
74 bIgnoreHandRotation(false),
75 InitialLinearTranslation(FVector::ZeroVector),
76 MinLinearTranslation(FVector::ZeroVector),
77 MaxLinearTranslation(FVector::ZeroVector),
78 InitialAngularTranslation(FRotator::ZeroRotator),
79 MinAngularTranslation(FRotator::ZeroRotator),
80 MaxAngularTranslation(FRotator::ZeroRotator)
82 BaseTransform = FTransform::Identity;
83 bHasValidBaseTransform =
false;
88UCLASS(NotBlueprintable, ClassGroup = (
VRExpansionPlugin), hideCategories = TickSettings)
96 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "InteractionSettings")
99 virtual
void OnBeginPlay_Implementation(
UObject * CallingOwner) override;
100 virtual
bool GetWorldTransform_Implementation(
UGripMotionControllerComponent * GrippingController,
float DeltaTime, FTransform & WorldTransform, const FTransform &ParentTransform,
FBPActorGripInformation &Grip,
AActor * actor, UPrimitiveComponent * root,
bool bRootHasInterface,
bool bActorHasInterface,
bool bIsForTeleport) override;
106 UFUNCTION(BlueprintCallable, Category = "InteractionSettings")
107 void RemoveHandRotation()
119 FTransform compTrans = this->GetParentTransform(
true, GripInformation.
GrippedBoneName);
121 InteractionSettings.BaseTransform = FTransform(InteractionSettings.BaseTransform.ToInverseMatrixWithScale()) * compTrans;
122 InteractionSettings.BaseTransform.SetScale3D(GrippingController->
GetPivotTransform().GetScale3D());
123 InteractionSettings.BaseTransform.SetRotation(FQuat::Identity);
125 InteractionSettings.BaseTransform = compTrans.GetRelativeTransform(InteractionSettings.BaseTransform);
126 InteractionSettings.bHasValidBaseTransform =
true;