54 UPROPERTY(BlueprintAssignable, Category =
"VRSliderComponent")
55 FVRSliderHitPointSignature OnSliderHitPoint;
57 UFUNCTION(BlueprintImplementableEvent, meta = (
DisplayName = "Slider State Changed"))
58 void ReceiveSliderHitPoint(
float SliderProgressPoint);
60 UPROPERTY(BlueprintAssignable, Category = "VRSliderComponent")
61 FVRSliderFinishedLerpingSignature OnSliderFinishedLerping;
63 UFUNCTION(BlueprintImplementableEvent, meta = (
DisplayName = "Slider Finished Lerping"))
64 void ReceiveSliderFinishedLerping(
float FinalProgress);
68 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRSliderComponent")
72 float LastSliderProgressState;
74 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRSliderComponent")
75 FVector MaxSlideDistance;
77 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRSliderComponent")
78 FVector MinSlideDistance;
80 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRSliderComponent")
84 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRSliderComponent|Momentum Settings", meta = (ClampMin = "0", ClampMax = "12", UIMin = "0", UIMax = "12"))
88 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRSliderComponent|Momentum Settings", meta = (ClampMin = "0.0", ClampMax = "10.0", UIMin = "0.0", UIMax = "10.0"))
89 float SliderMomentumFriction;
92 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRSliderComponent|Momentum Settings", meta = (ClampMin = "0.0", ClampMax = "1.0", UIMin = "0.0", UIMax = "1.0"))
93 float SliderRestitution;
96 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRSliderComponent|Momentum Settings", meta = (ClampMin = "0.0", UIMin = "0.0"))
97 float MaxSliderMomentum;
99 UPROPERTY(BlueprintReadOnly, Category = "VRSliderComponent")
103 FVector MomentumAtDrop;
104 FVector LastSliderProgress;
105 float SplineMomentumAtDrop;
106 float SplineLastSliderProgress;
109 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "VRSliderComponent")
110 float CurrentSliderProgress;
112 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRSliderComponent")
113 bool bSlideDistanceIsInParentSpace;
116 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRSliderComponent")
120 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRSliderComponent")
121 bool bAutoDropWhenLocked;
124 UFUNCTION(BlueprintCallable, Category = "GripSettings")
125 void SetIsLocked(
bool bNewLockedState);
129 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRSliderComponent")
130 bool bUseLegacyLogic;
133 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRSliderComponent", meta = (ClampMin = "0.0", ClampMax = "1.0", UIMin = "0.0", UIMax = "1.0"))
134 float EventThrowThreshold;
135 bool bHitEventThreshold;
137 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GripSettings")
138 float PrimarySlotRange;
140 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GripSettings")
141 float SecondarySlotRange;
143 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GripSettings")
147 UFUNCTION(BlueprintCallable, Category = "GripSettings")
148 void SetGripPriority(
int NewGripPriority);
151 UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Replicated, Category = "VRSliderComponent")
152 USplineComponent * SplineComponentToFollow;
161 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRSliderComponent")
162 bool bFollowSplineRotationAndScale;
165 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRSliderComponent")
166 bool bEnforceSplineLinearity;
173 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRSliderComponent")
177 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRSliderComponent", meta = (ClampMin = "0", UIMin = "0"))
178 float SplineLerpValue;
181 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRSliderComponent")
182 bool bSliderUsesSnapPoints;
185 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRSliderComponent", meta = (editcondition = "bSliderUsesSnapPoints", ClampMin = "0.0", ClampMax = "1.0", UIMin = "0.0", UIMax = "1.0"))
189 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRSliderComponent", meta = (editcondition = "bSliderUsesSnapPoints", ClampMin = "0.0", ClampMax = "1.0", UIMin = "0.0", UIMax = "1.0"))
194 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRSliderComponent", meta = (editcondition = "bSliderUsesSnapPoints") )
195 bool bIncrementProgressBetweenSnapPoints;
199 virtual
void OnRegister() override;
202 UPROPERTY(BlueprintReadOnly, ReplicatedUsing = OnRep_InitialRelativeTransform, Category = "VRSliderComponent")
206 virtual
void OnRep_InitialRelativeTransform()
208 CalculateSliderProgress();
211 FVector InitialInteractorLocation;
212 FVector InitialGripLoc;
213 FVector InitialDropLocation;
216 void CheckSliderProgress();
225 float GetDistanceAlongSplineAtSplineInputKey(
float InKey)
const;
229 UFUNCTION(BlueprintCallable, Category =
"VRSliderComponent")
230 float CalculateSliderProgress();
233 UFUNCTION(BlueprintCallable, Category = "VRSliderComponent")
234 void SetSliderProgress(
float NewSliderProgress);
237 UFUNCTION(BlueprintCallable, Category = "VRSliderComponent")
238 void ResetInitialSliderLocation();
241 UFUNCTION(BlueprintCallable, Category = "VRSliderComponent")
242 void SetSplineComponentToFollow(USplineComponent * SplineToFollow);
244 void ResetToParentSplineLocation();
246 void GetLerpedKey(
float &ClosestKey,
float DeltaTime);
247 float GetCurrentSliderProgress(FVector CurLocation,
bool bUseKeyInstead = false,
float CurKey = 0.f);
248 FVector ClampSlideVector(FVector ValueToClamp);
255 virtual
void GetOwnedGameplayTags(FGameplayTagContainer& TagContainer)
const override
257 TagContainer = GameplayTags;
261 UPROPERTY(EditAnywhere, Replicated, BlueprintReadWrite, Category =
"GameplayTags")
262 FGameplayTagContainer GameplayTags;
266 virtual
void PreReplication(IRepChangedPropertyTracker & ChangedPropertyTracker) override;
270 UPROPERTY(EditAnywhere, Replicated, BlueprintReadWrite, Category = "VRGripInterface")
271 bool bRepGameplayTags;
274 UPROPERTY(EditAnywhere, Replicated, BlueprintReadWrite, Category = "VRGripInterface|Replication")
275 bool bReplicateMovement;
277 virtual
void TickComponent(
float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override;
278 virtual
void BeginPlay() override;
280 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
284 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
291 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface", meta = (ScriptName = "IsDenyGripping"))
294 UPROPERTY(BlueprintReadOnly, Category = "VRGripInterface", meta = (ScriptName = "IsCurrentlyHeld"))
297 UPROPERTY(BlueprintReadOnly, Category = "VRGripInterface")
299 bool bOriginalReplicatesMovement;
303 UPROPERTY(BlueprintAssignable, Category = "Grip Events")
304 FVROnGripSignature OnGripped;
308 UPROPERTY(BlueprintAssignable, Category = "Grip Events")
309 FVROnDropSignature OnDropped;
321 bool SimulateOnDrop_Implementation() override;
336 void GetGripStiffnessAndDamping_Implementation(
float& GripStiffnessOut,
float& GripDampingOut) override;
342 float GripBreakDistance_Implementation() override;
345 void ClosestGripSlotInRange_Implementation(FVector WorldLocation,
bool bSecondarySlot,
bool& bHadSlotInRange, FTransform& SlotWorldTransform, FName& SlotName,
UGripMotionControllerComponent* CallingController =
nullptr, FName OverridePrefix = NAME_None) override;
348 bool AllowsMultipleGrips_Implementation() override;
351 void IsHeld_Implementation(TArray<
FBPGripPair>& CurHoldingControllers,
bool& bCurIsHeld) override;
363 bool GetGripScripts_Implementation(TArray<
UVRGripScriptBase*>& ArrayReference) override;
392 void OnUsed_Implementation() override;
395 void OnEndUsed_Implementation() override;
398 void OnSecondaryUsed_Implementation() override;
401 void OnEndSecondaryUsed_Implementation() override;
404 void OnInput_Implementation(FKey Key, EInputEvent KeyEvent) override;