A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
VRLeverComponent.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "MotionControllerComponent.h"
8#include "VRGripInterface.h"
9#include "GameplayTagContainer.h"
10#include "GameplayTagAssetInterface.h"
13#include "PhysicsEngine/ConstraintInstance.h"
14#include "Components/StaticMeshComponent.h"
15
16#include "PhysicsPublic.h"
17
18#if WITH_PHYSX
19#include "PhysXPublic.h"
20#endif // WITH_PHYSX
21
22#include "VRLeverComponent.generated.h"
23
24
25UENUM(Blueprintable)
26enum class EVRInteractibleLeverAxis : uint8
27{
28 /* Rotates only towards the X Axis */
30 /* Rotates only towards the Y Axis */
31 Axis_Y,
32 /* Rotates only towards the Z Axis */
33 Axis_Z,
34 /* Rotates freely on the XY Axis' */
35 Axis_XY,
36 /* Acts like a flight stick, with AllCurrentLeverAngles being the positive / negative of the current full angle (yaw based on initial grip delta) */
38};
39
40UENUM(Blueprintable)
41enum class EVRInteractibleLeverEventType : uint8
42{
45};
46
47UENUM(Blueprintable)
48enum class EVRInteractibleLeverReturnType : uint8
49{
51 Stay,
52
55
58
61
64};
65
67DECLARE_DYNAMIC_MULTICAST_DELEGATE_FourParams(FVRLeverStateChangedSignature, bool, LeverStatus, EVRInteractibleLeverEventType, LeverStatusType, float, LeverAngleAtTime, float, FullLeverAngleAtTime);
68DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FVRLeverFinishedLerpingSignature, float, FinalAngle);
69
74UCLASS(Blueprintable, meta = (BlueprintSpawnableComponent), ClassGroup = (VRExpansionPlugin))
75class VREXPANSIONPLUGIN_API UVRLeverComponent : public UStaticMeshComponent, public IVRGripInterface, public IGameplayTagAssetInterface
77 GENERATED_BODY()
78
79public:
80 UVRLeverComponent(const FObjectInitializer& ObjectInitializer);
81
82
84
85 // Call to use an object
86 UPROPERTY(BlueprintAssignable, Category = "VRLeverComponent")
87 FVRLeverStateChangedSignature OnLeverStateChanged;
88
89 UFUNCTION(BlueprintImplementableEvent, meta = (DisplayName = "Lever State Changed"))
90 void ReceiveLeverStateChanged(bool LeverStatus, EVRInteractibleLeverEventType LeverStatusType, float LeverAngleAtTime, float FullLeverAngleAttime);
91
92 UPROPERTY(BlueprintAssignable, Category = "VRLeverComponent")
93 FVRLeverFinishedLerpingSignature OnLeverFinishedLerping;
94
95 UFUNCTION(BlueprintImplementableEvent, meta = (DisplayName = "Lever Finished Lerping"))
96 void ReceiveLeverFinishedLerping(float LeverFinalAngle);
97
98 // Primary axis angle only
99 UPROPERTY(BlueprintReadOnly, Category = "VRLeverComponent")
100 float CurrentLeverAngle;
101
102 // Writes out all current angles to this rotator, useful mostly for XY and Flight stick modes
103 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent")
104 FRotator AllCurrentLeverAngles;
105
106 // Bearing Direction, for X/Y is their signed direction, for XY mode it is an actual 2D directional vector
107 UPROPERTY(BlueprintReadOnly, Category = "VRLeverComponent")
108 FVector CurrentLeverForwardVector;
109
110 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent")
111 bool bIsPhysicsLever;
112
113 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent")
114 bool bUngripAtTargetRotation;
115
116 // Rotation axis to use, XY is combined X and Y, only LerpToZero and PositiveLimits work with this mode
117 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent")
118 EVRInteractibleLeverAxis LeverRotationAxis;
119
120 // The percentage of the angle at witch the lever will toggle
121 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent", meta = (ClampMin = "0.01", ClampMax = "1.0", UIMin = "0.01", UIMax = "1.0"))
122 float LeverTogglePercentage;
123
124 // The max angle of the lever in the positive direction
125 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent", meta = (ClampMin = "0.0", ClampMax = "179.9", UIMin = "0.0", UIMax = "180.0"))
126 float LeverLimitPositive;
128 // The max angle of the lever in the negative direction
129 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent", meta = (ClampMin = "0.0", ClampMax = "179.9", UIMin = "0.0", UIMax = "180.0"))
130 float LeverLimitNegative;
131
132 // The max angle of the flightsticks yaw in either direction off of 0
133 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent|Flight Stick Settings", meta = (ClampMin = "0.0", ClampMax = "179.9", UIMin = "0.0", UIMax = "180.0"))
134 float FlightStickYawLimit;
136 // If true then this lever is locked in place until unlocked again
137 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent")
138 bool bIsLocked;
139
140 // If true then this lever will auto drop even when locked
141 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent")
142 bool bAutoDropWhenLocked;
143
144 // Sets if the lever is locked or not
145 UFUNCTION(BlueprintCallable, Category = "GripSettings")
146 void SetIsLocked(bool bNewLockedState);
147
148 // Checks and applies auto drop if we need too
149 bool CheckAutoDrop(UGripMotionControllerComponent* GrippingController, const FBPActorGripInformation& GripInformation);
150
151 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent")
152 EVRInteractibleLeverReturnType LeverReturnTypeWhenReleased;
153
154 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent")
155 bool bSendLeverEventsDuringLerp;
157 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent")
158 float LeverReturnSpeed;
159
160 // If true then we will blend the values of the XY axis' by the AngleThreshold, lowering Pitch/Yaw influence based on how far from leaning into the axis that the lever is
161 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent|Flight Stick Settings")
162 bool bBlendAxisValuesByAngleThreshold;
163
164 // The angle threshold to blend around, default of 90.0 blends 0.0 to 1.0 smoothly across entire sweep
165 // A value of 45 would blend it to 0 halfway rotated to the other axis, while 180 would still leave half the influence when fully rotated out of facing
166 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent|Flight Stick Settings", meta = (ClampMin = "1.0", ClampMax = "360.0", UIMin = "1.0", UIMax = "360.0"))
167 float AngleThreshold;
168
169 // Number of frames to average momentum across for the release momentum (avoids quick waggles)
170 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent|Momentum Settings", meta = (ClampMin = "0", ClampMax = "12", UIMin = "0", UIMax = "12"))
171 int FramesToAverage;
173 // Units in degrees per second to slow a momentum lerp down
174 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent|Momentum Settings", meta = (ClampMin = "0.0", ClampMax = "180", UIMin = "0.0", UIMax = "180.0"))
175 float LeverMomentumFriction;
176
177 // % of elasticity on reaching the end 0 - 1.0
178 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent|Momentum Settings", meta = (ClampMin = "0.0", ClampMax = "1.0", UIMin = "0.0", UIMax = "1.0"))
179 float LeverRestitution;
181 // Maximum momentum of the lever in degrees per second
182 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent|Momentum Settings", meta = (ClampMin = "0.0", UIMin = "0.0"))
183 float MaxLeverMomentum;
184
185 UPROPERTY(BlueprintReadOnly, Category = "VRLeverComponent")
186 bool bIsLerping;
187
188 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GripSettings")
189 float PrimarySlotRange;
190
191 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GripSettings")
192 float SecondarySlotRange;
193
194 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GripSettings")
195 int GripPriority;
197 // Sets the grip priority
198 UFUNCTION(BlueprintCallable, Category = "GripSettings")
199 void SetGripPriority(int NewGripPriority);
200
201 // Full precision current angle
202 float FullCurrentAngle;
203
204 float LastDeltaAngle;
205
206 // Resetting the initial transform here so that it comes in prior to BeginPlay and save loading.
207 virtual void OnRegister() override;
208
209 // Now replicating this so that it works correctly over the network
210 UPROPERTY(BlueprintReadOnly, ReplicatedUsing = OnRep_InitialRelativeTransform, Category = "VRLeverComponent")
211 FTransform_NetQuantize InitialRelativeTransform;
213 UFUNCTION()
214 virtual void OnRep_InitialRelativeTransform()
215 {
216 ReCalculateCurrentAngle();
217 }
218
219 // Flight stick variables
220 FTransform InteractorOffsetTransform;
221
222 FVector InitialInteractorLocation;
223 FVector InitialInteractorDropLocation;
224 float InitialGripRot;
225 float RotAtGrab;
226 FQuat qRotAtGrab;
227 bool bLeverState;
228 bool bIsInFirstTick;
230 // For momentum retention
231 float MomentumAtDrop;
232 float LastLeverAngle;
233
234 float CalcAngle(EVRInteractibleLeverAxis AxisToCalc, FVector CurInteractorLocation, bool bSkipLimits = false);
235
236 void LerpAxis(float CurrentAngle, float DeltaTime);
237
238 void CalculateCurrentAngle(FTransform & CurrentTransform);
239
240 // ------------------------------------------------
241 // Gameplay tag interface
242 // ------------------------------------------------
245 virtual void GetOwnedGameplayTags(FGameplayTagContainer& TagContainer) const override
246 {
247 TagContainer = GameplayTags;
248 }
249
251 UPROPERTY(EditAnywhere, Replicated, BlueprintReadWrite, Category = "GameplayTags")
252 FGameplayTagContainer GameplayTags;
253
254 // End Gameplay Tag Interface
255
256 virtual void PreReplication(IRepChangedPropertyTracker & ChangedPropertyTracker) override;
257
258
259 // Requires bReplicates to be true for the component
260 UPROPERTY(EditAnywhere, Replicated, BlueprintReadWrite, Category = "VRGripInterface")
261 bool bRepGameplayTags;
262
263 // Overrides the default of : true and allows for controlling it like in an actor, should be default of off normally with grippable components
264 UPROPERTY(EditAnywhere, Replicated, BlueprintReadWrite, Category = "VRGripInterface|Replication")
265 bool bReplicateMovement;
266
267 virtual void TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override;
268 virtual void BeginPlay() override;
269
270 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
271 EGripMovementReplicationSettings MovementReplicationSetting;
272
273 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
274 float Stiffness;
275
276 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
277 float Damping;
278
279 // Distance before the object will break out of the hand, 0.0f == never will
280 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
281 float BreakDistance;
282
283 // Should we deny gripping on this object
284 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface", meta = (ScriptName = "IsDenyGripping"))
285 bool bDenyGripping;
286
287 UPROPERTY(BlueprintReadOnly, Category = "VRGripInterface", meta = (ScriptName = "IsCurrentlyHeld"))
288 bool bIsHeld; // Set on grip notify, not net serializing
289
290 UPROPERTY(BlueprintReadOnly, Category = "VRGripInterface")
291 FBPGripPair HoldingGrip; // Set on grip notify, not net serializing
292 bool bOriginalReplicatesMovement;
293
294 TWeakObjectPtr<USceneComponent> ParentComponent;
295
296 // Should be called after the lever is moved post begin play
297 UFUNCTION(BlueprintCallable, Category = "VRLeverComponent")
298 void ResetInitialLeverLocation(bool bAllowThrowingEvents = true);
299
305 UFUNCTION(BlueprintCallable, Category = "VRLeverComponent")
306 void SetLeverAngle(float NewAngle, FVector DualAxisForwardVector, bool bAllowThrowingEvents = true);
307
308 // ReCalculates the current angle, sets it on the back end, and returns it
309 // If allow throwing events is true then it will trigger the callbacks for state changes as well
310 UFUNCTION(BlueprintCallable, Category = "VRLeverComponent")
311 float ReCalculateCurrentAngle(bool bAllowThrowingEvents = true);
313 void ProccessCurrentState(bool bWasLerping = false, bool bThrowEvents = true, bool bCheckAutoDrop = true);
314
315 virtual void OnUnregister() override;
316
317 // Called when a object is gripped
318 // If you override the OnGrip event then you will need to call the parent implementation or this event will not fire!!
319 UPROPERTY(BlueprintAssignable, Category = "Grip Events")
320 FVROnGripSignature OnGripped;
321
322 // Called when a object is dropped
323 // If you override the OnGrip event then you will need to call the parent implementation or this event will not fire!!
324 UPROPERTY(BlueprintAssignable, Category = "Grip Events")
325 FVROnDropSignature OnDropped;
326
327#if WITH_PHYSX
328 physx::PxD6Joint* HandleData;
329 //int32 SceneIndex;
330#endif
332 bool DestroyConstraint();
333 bool SetupConstraint();
334
335
336 // Grip interface setup
337
338 // Set up as deny instead of allow so that default allows for gripping
339 // The GripInitiator is not guaranteed to be valid, check it for validity
340 bool DenyGripping_Implementation(UGripMotionControllerComponent * GripInitiator = nullptr) override;
342 // How an interfaced object behaves when teleporting
343 EGripInterfaceTeleportBehavior TeleportBehavior_Implementation() override;
344
345 // Should this object simulate on drop
346 bool SimulateOnDrop_Implementation() override;
347
348 // Grip type to use
349 EGripCollisionType GetPrimaryGripType_Implementation(bool bIsSlot) override;
350
351 // Secondary grip type
352 ESecondaryGripType SecondaryGripType_Implementation() override;
353
354 // Define which movement repliation setting to use
355 EGripMovementReplicationSettings GripMovementReplicationType_Implementation() override;
357 // Define the late update setting
358 EGripLateUpdateSettings GripLateUpdateSetting_Implementation() override;
360 // What grip stiffness and damping to use if using a physics constraint
361 void GetGripStiffnessAndDamping_Implementation(float& GripStiffnessOut, float& GripDampingOut) override;
362
363 // Get the advanced physics settings for this grip
364 FBPAdvGripSettings AdvancedGripSettings_Implementation() override;
365
366 // What distance to break a grip at (only relevent with physics enabled grips
367 float GripBreakDistance_Implementation() override;
368
369 // Get grip slot in range
370 void ClosestGripSlotInRange_Implementation(FVector WorldLocation, bool bSecondarySlot, bool& bHadSlotInRange, FTransform& SlotWorldTransform, FName& SlotName, UGripMotionControllerComponent* CallingController = nullptr, FName OverridePrefix = NAME_None) override;
371
372 // Check if an object allows multiple grips at one time
373 bool AllowsMultipleGrips_Implementation() override;
374
375 // Returns if the object is held and if so, which controllers are holding it
376 void IsHeld_Implementation(TArray<FBPGripPair>& CurHoldingControllers, bool& bCurIsHeld) override;
378 // Interface function used to throw the delegates that is invisible to blueprints so that it can't be overridden
379 virtual void Native_NotifyThrowGripDelegates(UGripMotionControllerComponent* Controller, bool bGripped, const FBPActorGripInformation& GripInformation, bool bWasSocketed = false) override;
380
381 // Sets is held, used by the plugin
382 void SetHeld_Implementation(UGripMotionControllerComponent* NewHoldingController, uint8 GripID, bool bNewIsHeld) override;
383
384 // Returns if the object wants to be socketed
385 bool RequestsSocketing_Implementation(USceneComponent*& ParentToSocketTo, FName& OptionalSocketName, FTransform_NetQuantize& RelativeTransform) override;
386
387 // Get grip scripts
388 bool GetGripScripts_Implementation(TArray<UVRGripScriptBase*>& ArrayReference) override;
390
391 // Events //
392
393 // Event triggered each tick on the interfaced object when gripped, can be used for custom movement or grip based logic
394 void TickGrip_Implementation(UGripMotionControllerComponent* GrippingController, const FBPActorGripInformation& GripInformation, float DeltaTime) override;
395
396 // Event triggered on the interfaced object when gripped
397 void OnGrip_Implementation(UGripMotionControllerComponent* GrippingController, const FBPActorGripInformation& GripInformation) override;
398
399 // Event triggered on the interfaced object when grip is released
400 void OnGripRelease_Implementation(UGripMotionControllerComponent* ReleasingController, const FBPActorGripInformation& GripInformation, bool bWasSocketed = false) override;
401
402 // Event triggered on the interfaced object when child component is gripped
403 void OnChildGrip_Implementation(UGripMotionControllerComponent* GrippingController, const FBPActorGripInformation& GripInformation) override;
404
405 // Event triggered on the interfaced object when child component is released
406 void OnChildGripRelease_Implementation(UGripMotionControllerComponent* ReleasingController, const FBPActorGripInformation& GripInformation, bool bWasSocketed = false) override;
407
408 // Event triggered on the interfaced object when secondary gripped
409 void OnSecondaryGrip_Implementation(UGripMotionControllerComponent* GripOwningController, USceneComponent* SecondaryGripComponent, const FBPActorGripInformation& GripInformation) override;
410
411 // Event triggered on the interfaced object when secondary grip is released
412 void OnSecondaryGripRelease_Implementation(UGripMotionControllerComponent* GripOwningController, USceneComponent* ReleasingSecondaryGripComponent, const FBPActorGripInformation& GripInformation) override;
413
414 // Interaction Functions
415
416 // Call to use an object
417 void OnUsed_Implementation() override;
418
419 // Call to stop using an object
420 void OnEndUsed_Implementation() override;
421
422 // Call to use an object
423 void OnSecondaryUsed_Implementation() override;
424
425 // Call to stop using an object
426 void OnEndSecondaryUsed_Implementation() override;
427
428 // Call to send an action event to the object
429 void OnInput_Implementation(FKey Key, EInputEvent KeyEvent) override;
430
431 protected:
432
433};
EGripMovementReplicationSettings
UENUM(Blueprintable)
ESecondaryGripType
UENUM(Blueprintable)
EGripCollisionType
UENUM(Blueprintable)
EGripLateUpdateSettings
UENUM(Blueprintable)
EGripInterfaceTeleportBehavior
UENUM(Blueprintable)
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FVRLeverFinishedLerpingSignature, float, FinalAngle)
EVRInteractibleLeverEventType
UENUM(Blueprintable)
DECLARE_DYNAMIC_MULTICAST_DELEGATE_FourParams(FVRLeverStateChangedSignature, bool, LeverStatus, EVRInteractibleLeverEventType, LeverStatusType, float, LeverAngleAtTime, float, FullLeverAngleAtTime)
EVRInteractibleLeverReturnType
UENUM(Blueprintable)
EVRInteractibleLeverAxis
UENUM(Blueprintable)
virtual void Native_NotifyThrowGripDelegates(UGripMotionControllerComponent *Controller, bool bGripped, const FBPActorGripInformation &GripInformation, bool bWasSocketed=false)
UCLASS(Blueprintable, meta = (BlueprintSpawnableComponent), ClassGroup = MotionController)
UCLASS(Blueprintable, meta = (BlueprintSpawnableComponent), ClassGroup = (VRExpansionPlugin))
float MaxLeverMomentum
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent|Momentum Settings",...
float LeverLimitNegative
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent", meta = (ClampMin = "0....
FTransform InteractorOffsetTransform
float LeverRestitution
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent|Momentum Settings",...
bool bReplicateMovement
UPROPERTY(EditAnywhere, Replicated, BlueprintReadWrite, Category = "VRGripInterface|Replication")
FBPGripPair HoldingGrip
UPROPERTY(BlueprintReadOnly, Category = "VRGripInterface")
FTransform_NetQuantize InitialRelativeTransform
UPROPERTY(BlueprintReadOnly, ReplicatedUsing = OnRep_InitialRelativeTransform, Category = "VRLeverCom...
float Stiffness
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
virtual void GetOwnedGameplayTags(FGameplayTagContainer &TagContainer) const override
bool bIsLocked
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent")
bool bDenyGripping
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface", meta = (ScriptName = "IsDen...
bool bRepGameplayTags
UPROPERTY(EditAnywhere, Replicated, BlueprintReadWrite, Category = "VRGripInterface")
void ReceiveLeverFinishedLerping(float LeverFinalAngle)
UFUNCTION(BlueprintImplementableEvent, meta = (DisplayName = "Lever Finished Lerping"))
int GripPriority
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GripSettings")
EGripMovementReplicationSettings MovementReplicationSetting
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
bool bIsHeld
UPROPERTY(BlueprintReadOnly, Category = "VRGripInterface", meta = (ScriptName = "IsCurrentlyHeld"))
bool bIsPhysicsLever
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent")
float LeverMomentumFriction
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent|Momentum Settings",...
int FramesToAverage
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent|Momentum Settings",...
float SecondarySlotRange
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GripSettings")
EVRInteractibleLeverAxis LeverRotationAxis
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent")
float LeverLimitPositive
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent", meta = (ClampMin = "0....
float AngleThreshold
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent|Flight Stick Settings",...
bool bIsLerping
UPROPERTY(BlueprintReadOnly, Category = "VRLeverComponent")
bool bBlendAxisValuesByAngleThreshold
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent|Flight Stick Settings")
FRotator AllCurrentLeverAngles
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent")
FVRLeverStateChangedSignature OnLeverStateChanged
UPROPERTY(BlueprintAssignable, Category = "VRLeverComponent")
FVROnGripSignature OnGripped
UPROPERTY(BlueprintAssignable, Category = "Grip Events")
float LeverTogglePercentage
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent", meta = (ClampMin = "0....
float LeverReturnSpeed
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent")
bool bUngripAtTargetRotation
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent")
FVector InitialInteractorLocation
bool bSendLeverEventsDuringLerp
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent")
float FlightStickYawLimit
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent|Flight Stick Settings",...
virtual void OnRep_InitialRelativeTransform()
UFUNCTION()
FVector InitialInteractorDropLocation
void ReceiveLeverStateChanged(bool LeverStatus, EVRInteractibleLeverEventType LeverStatusType, float LeverAngleAtTime, float FullLeverAngleAttime)
UFUNCTION(BlueprintImplementableEvent, meta = (DisplayName = "Lever State Changed"))
FVRLeverFinishedLerpingSignature OnLeverFinishedLerping
UPROPERTY(BlueprintAssignable, Category = "VRLeverComponent")
TWeakObjectPtr< USceneComponent > ParentComponent
float Damping
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
FVROnDropSignature OnDropped
UPROPERTY(BlueprintAssignable, Category = "Grip Events")
FGameplayTagContainer GameplayTags
UPROPERTY(EditAnywhere, Replicated, BlueprintReadWrite, Category = "GameplayTags")
float CurrentLeverAngle
UPROPERTY(BlueprintReadOnly, Category = "VRLeverComponent")
float BreakDistance
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
float PrimarySlotRange
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GripSettings")
EVRInteractibleLeverReturnType LeverReturnTypeWhenReleased
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent")
bool bAutoDropWhenLocked
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRLeverComponent")
FVector CurrentLeverForwardVector
UPROPERTY(BlueprintReadOnly, Category = "VRLeverComponent")
USTRUCT(BlueprintType, Category = "VRExpansionLibrary")
USTRUCT(BlueprintType, Category = "VRExpansionLibrary")
USTRUCT(BlueprintType, Category = "VRExpansionLibrary")
USTRUCT(BlueprintType, Category = "VRExpansionLibrary|TransformNetQuantize", meta = (HasNativeMake = ...