A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
VRMountComponent.cpp
Go to the documentation of this file.
1// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
2
5#include "Net/UnrealNetwork.h"
6
7//=============================================================================
8UVRMountComponent::UVRMountComponent(const FObjectInitializer& ObjectInitializer)
9 : Super(ObjectInitializer)
10{
11 this->SetGenerateOverlapEvents(true);
12 this->PrimaryComponentTick.bStartWithTickEnabled = false;
13 PrimaryComponentTick.bCanEverTick = true;
14
15 bRepGameplayTags = false;
16
17 // Defaulting these true so that they work by default in networked environments
18 bReplicateMovement = true;
19
21 BreakDistance = 100.0f;
22 Stiffness = 1500.0f;
23 Damping = 200.0f;
24
26
27
28 InitialRelativeTransform = FTransform::Identity;
29 InitialInteractorLocation = FVector::ZeroVector;
30 InitialGripRot = 0.0f;
31 qRotAtGrab = FQuat::Identity;
32
33 bDenyGripping = false;
34
35 PrimarySlotRange = 100.f;
36 SecondarySlotRange = 100.f;
37 GripPriority = 1;
38
39 FlipingZone = 0.4;
41
42 // Set to only overlap with things so that its not ruined by touching over actors
43 this->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Overlap);
44}
45
46//=============================================================================
50
51
52void UVRMountComponent::GetLifetimeReplicatedProps(TArray< class FLifetimeProperty > & OutLifetimeProps) const
53{
54 Super::GetLifetimeReplicatedProps(OutLifetimeProps);
55
56 DOREPLIFETIME(UVRMountComponent, bRepGameplayTags);
58 DOREPLIFETIME_CONDITION(UVRMountComponent, GameplayTags, COND_Custom);
59}
60
61void UVRMountComponent::PreReplication(IRepChangedPropertyTracker & ChangedPropertyTracker)
62{
63 Super::PreReplication(ChangedPropertyTracker);
64
65 // Don't replicate if set to not do it
66 DOREPLIFETIME_ACTIVE_OVERRIDE(UVRMountComponent, GameplayTags, bRepGameplayTags);
67
68 DOREPLIFETIME_ACTIVE_OVERRIDE_PRIVATE_PROPERTY(USceneComponent, RelativeLocation, bReplicateMovement);
69 DOREPLIFETIME_ACTIVE_OVERRIDE_PRIVATE_PROPERTY(USceneComponent, RelativeRotation, bReplicateMovement);
70 DOREPLIFETIME_ACTIVE_OVERRIDE_PRIVATE_PROPERTY(USceneComponent, RelativeScale3D, bReplicateMovement);
71}
72
74{
75 Super::OnRegister();
76 ResetInitialMountLocation(); // Load the original mount location
77}
78
80{
81 // Call the base class
82 Super::BeginPlay();
83}
84
85void UVRMountComponent::TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction)
86{
87 // Call supers tick (though I don't think any of the base classes to this actually implement it)
88 Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
89
90}
91
93{
94 Super::OnUnregister();
95}
96
97void UVRMountComponent::TickGrip_Implementation(UGripMotionControllerComponent * GrippingController, const FBPActorGripInformation & GripInformation, float DeltaTime)
98{
99 // Handle manual tracking here
100
102 FVector CurInteractorLocation = CurrentRelativeTransform.InverseTransformPosition(GrippingController->GetPivotLocation());
103
104 switch (MountRotationAxis)
105 {
107 {
108 //The current Mount to target location vector.
109 FVector MountToTarget;
110
111 //In case the Mount is initially gripped on the back (negative of relative x axis)
112 if (GrippedOnBack)
113 {
114 CurInteractorLocation = CurInteractorLocation *-1;
115 }
116
117 //Rotate the Initial Grip relative to the Forward Axis so it represents the current correct vector after Mount is rotated.
118 FRotator RelativeRot = GetRelativeRotation();
119 FVector CurToForwardAxisVec = FRotator(RelativeRot.Pitch, RelativeRot.Yaw, TwistDiff).RotateVector(InitialGripToForwardVec);
120
121 //The Current InteractorLocation based on current interactor location to intersection point on sphere with forward axis.
122 CurInteractorLocation = (CurInteractorLocation.GetSafeNormal() * InitialInteractorLocation.Size() + CurToForwardAxisVec).GetSafeNormal()*CurInteractorLocation.Size();
123
124 FRotator Rot;
125
126 //If we are inside the fliping zone defined from Cone Area on top or bottom. ToDo: This probably can be combined with later FlipZone.
128 {
129 // Entering the flip zone for the first time, a initial forward plane is made to ajust currentinteractorlocation relative x and y. This immitates a mechanical pull/push
131 {
132 //Unmodified Right vector can still be used here to create the plane, before it will be changed later.
133 ForwardPullPlane = FPlane(FVector::ZeroVector, FVector(EntryRightVec.X, EntryRightVec.Y, 0).GetSafeNormal());
134
136 bLerpingOutOfFlipZone = false;
137
138 CurInterpGripLoc = CurInteractorLocation;
139
140 CurPointOnForwardPlane = FPlane::PointPlaneProject(CurInteractorLocation, ForwardPullPlane);
141 }
142
144
145 CurPointOnForwardPlane = FPlane::PointPlaneProject(CurInteractorLocation, ForwardPullPlane);
146
147 FVector ForwardPlainDiffVec = CurPointOnForwardPlane - LastPointOnForwardPlane;
148
149 //Add the difference to how much we moved trough the forward plane since the last frame.
150 CurInterpGripLoc += ForwardPlainDiffVec;
151
152 // InterpTo the current projected point on forward plane over time when inside the FlipZone.
153 CurInterpGripLoc = FMath::VInterpConstantTo(CurInterpGripLoc, CurPointOnForwardPlane, GetWorld()->GetDeltaSeconds(), 50);
154
155 //The current location of the motion controller projected on to the forward plane. Only x and y is used from interpolation.
156 MountToTarget = FVector(CurInterpGripLoc.X, CurInterpGripLoc.Y, CurInteractorLocation.Z).GetSafeNormal();
157
158 //Save the CurInteractorLocation once to modify roll with it later
159 CurInteractorLocation = FVector(CurInterpGripLoc.X, CurInterpGripLoc.Y, CurInteractorLocation.Z);
160 }
161 else
162 {
163 //When going out of whole FlipZone Lerp yaw back to curinteractorlocation in case relative entry xy deviates to much from when leaving area
165 {
166 //If projected point on plane is not close enough to the "real" motion controller location lerp
167 if ((CurInterpGripLoc - CurInteractorLocation).Size() >= 1.0f)
168 {
169 //How fast yaw should rotate back when leaving flipzone. ToDo: For LerpOutSpeed maybe better us distance deviation
170 LerpOutAlpha = FMath::Clamp(LerpOutAlpha + FlipReajustYawSpeed / 100.0f, 0.0f, 1.0f);
171
172 //Lerp
173 CurInterpGripLoc = CurInterpGripLoc + LerpOutAlpha * (CurInteractorLocation - CurInterpGripLoc);
174
175 //The new vector to make rotation from.
176 MountToTarget = CurInterpGripLoc.GetSafeNormal();
177
178 //We left the flipzone completly, set everything back to normal.
179 if (LerpOutAlpha >= 0.97f)
180 {
181 bLerpingOutOfFlipZone = false;
182 bIsInsideBackFlipZone = false;
183 }
184 }
185 else
186 {
187 //If we are already near the real controller location just snap back
188 bLerpingOutOfFlipZone = false;
189 bIsInsideBackFlipZone = false;
190 MountToTarget = CurInteractorLocation.GetSafeNormal();
191 }
192 }
193 else
194 {
195 //There is still a possibility here maybe to be inside backflipzone, but Mount is actually already outside. So just use unmodified rotation.
196 MountToTarget = CurInteractorLocation.GetSafeNormal();
197 bIsInsideBackFlipZone = false;
198 }
199
200 }
201
202 //Setting the relative rotation once before using "accumulated" relative rotation to calculate roll onto it.
203 Rot = MountToTarget.Rotation();
204 this->SetRelativeRotation((FTransform(FRotator(Rot.Pitch, Rot.Yaw, 0))*InitialRelativeTransform).Rotator());
205
206
207 FVector nAxis;
208 float FlipAngle;
209 FQuat::FindBetweenVectors(FVector(0, 0, 1), CurInteractorLocation.GetSafeNormal()).ToAxisAndAngle(nAxis, FlipAngle);
210
211 // This part takes care of the roll rotation ff Mount is inside flipping zone on top or on bottom.
212 if (FlipAngle < FlipingZone || FlipAngle > PI - FlipingZone)
213 {
214 //When entering FlipZone for the first time setup initial properties
216 {
217 //We entered the FrontFlipzone
219
220 //Up and Right Vector when entering the FlipZone. Parent Rotation is accounted for.
221 if (USceneComponent * ParentComp = GetAttachParent())
222 {
223 EntryUpVec = ParentComp->GetComponentRotation().UnrotateVector(GetUpVector());
224 EntryRightVec = ParentComp->GetComponentRotation().UnrotateVector(GetRightVector());
225 }
226 else
227 {
228 EntryUpVec = GetUpVector();
229 EntryRightVec = GetRightVector();
230 }
231
232 //Only relative x and y is important for a Mount which has XY rotation limitation for the flip plane.
233 EntryUpXYNeg = FVector(EntryUpVec.X, EntryUpVec.Y, 0).GetSafeNormal()*-1;
234 //If flipping over the bottom
235 if (FlipAngle > PI - FlipingZone)
236 {
237 EntryUpXYNeg *= -1;
238 }
239
240 //A Plane perpendicular to the FlipZone relative EntryPoint XY UpVector. This plane determines when the roll has to be turned by 180 degree
241 FlipPlane = FPlane(FVector::ZeroVector, EntryUpXYNeg);
242 }
243
244 //CurInteractor vector to its projected point on flipplane
245 FVector CurInteractorToFlipPlaneVec = CurInteractorLocation - FPlane::PointPlaneProject(CurInteractorLocation, FlipPlane);
246
248 {
249 //If Mount rotation is on or over flipplane but still inside frontflipzone flip the roll.
250 if (FVector::DotProduct(CurInteractorToFlipPlaneVec, EntryUpXYNeg) <= 0)
251 {
254
256
257 if (bIsFlipped)
258 {
259 TwistDiff = 180;
260 }
261 else
262 {
263 TwistDiff = 0;
264 }
265 }
266 else
267 {
268 //If Mount Rotation is still inside FrontFlipZone ajust the roll so it looks naturally when moving the Mount against the FlipPlane
269
270 FVector RelativeUpVec = GetUpVector();
271
272 if(USceneComponent * ParentComp = GetAttachParent())
273 RelativeUpVec = ParentComp->GetComponentRotation().UnrotateVector(RelativeUpVec);
274
275 FVector CurrentUpVec = FVector(RelativeUpVec.X, RelativeUpVec.Y, 0).GetSafeNormal();
276
277 //If rotating over the top ajust relative UpVector
278 if (FlipAngle < FlipingZone)
279 {
280 CurrentUpVec *= -1;
281 }
282
283 float EntryTwist = FMath::Atan2(EntryUpXYNeg.Y, EntryUpXYNeg.X);
284 float CurTwist = FMath::Atan2(CurrentUpVec.Y, CurrentUpVec.X);
285
286 //Rotate the roll so relative up vector x y looks at the flip plane
287 if (bIsFlipped)
288 {
289 TwistDiff = FMath::RadiansToDegrees(EntryTwist - CurTwist - PI);
290 }
291 else
292 {
293 TwistDiff = FMath::RadiansToDegrees(EntryTwist - CurTwist);
294 }
295 }
296 }
297 else
298 {
299 //If Inside Back Flip Zone just flip the roll. ToDo: Dont just ajust roll to 0 or 180. Calculate Twist diff according to up vector to FlipPlane.
301 {
302 if (FVector::DotProduct(CurInteractorToFlipPlaneVec, EntryUpXYNeg) >= 0)
303 {
305 bIsInsideBackFlipZone = false;
306
308
309 if (bIsFlipped)
310 {
311 TwistDiff = 180;
312 }
313 else
314 {
315 TwistDiff = 0;
316 }
317 }
318 }
319 }
320
321 }
322 else
323 {
324 //If the Mount went into the flipping zone and back out without going over flip plane reset roll
326 bIsInsideBackFlipZone = false;
327
328 if (bIsFlipped)
329 {
330 TwistDiff = 180;
331 }
332 else
333 {
334 TwistDiff = 0;
335 }
336
338 {
339 //If never left FlipZone before but doing now it now, reset first time entry bool. ToDo: Maybe better to do this elsewhere.
341 LerpOutAlpha = 0;
342
343 //We left the flipzone so rotate yaw back from interpolated controller position on forward pull plane back to "real" one.
345 }
346
347 }
348
349 //Add Roll modifications to accumulated LocalRotation.
350 this->AddLocalRotation(FRotator(0, 0, -TwistDiff));
351
352 }break;
353 default:break;
354 }
355
356 // #TODO: This drop code is incorrect, it is based off of the initial point and not the location at grip - revise it at some point
357 // Also set it to after rotation
358 if (BreakDistance > 0.f && GrippingController->HasGripAuthority(GripInformation) && FVector::DistSquared(InitialInteractorDropLocation, this->GetComponentTransform().InverseTransformPosition(GrippingController->GetPivotLocation())) >= FMath::Square(BreakDistance))
359 {
360 if (GrippingController->OnGripOutOfRange.IsBound())
361 {
362 uint8 GripID = GripInformation.GripID;
363 GrippingController->OnGripOutOfRange.Broadcast(GripInformation, GripInformation.GripDistance);
364 }
365 else
366 {
367 GrippingController->DropObjectByInterface(this, HoldingGrip.GripID);
368 }
369 return;
370 }
371}
372
374{
376
377 // This lets me use the correct original location over the network without changes
378 FTransform ReversedRelativeTransform = FTransform(GripInformation.RelativeTransform.ToInverseMatrixWithScale());
379 FTransform RelativeToGripTransform = ReversedRelativeTransform * this->GetComponentTransform();
380
381 //continue here CurToForwardAxis is based on last gripped location ---> change this
382 InitialInteractorLocation = CurrentRelativeTransform.InverseTransformPosition(RelativeToGripTransform.GetTranslation());
383 InitialInteractorDropLocation = ReversedRelativeTransform.GetTranslation();
384
385 switch (MountRotationAxis)
386 {
388 {
389 //spaceharry
390
391 qRotAtGrab = this->GetComponentTransform().GetRelativeTransform(CurrentRelativeTransform).GetRotation();
392
393 FVector ForwardVectorToUse = GetForwardVector();
394
395 if (USceneComponent * ParentComp = GetAttachParent())
396 {
397 ForwardVectorToUse = ParentComp->GetComponentRotation().UnrotateVector(ForwardVectorToUse);
398 }
399
400 InitialForwardVector = InitialInteractorLocation.Size() * ForwardVectorToUse;
401
402 if (FVector::DotProduct(InitialInteractorLocation, ForwardVectorToUse) <= 0)
403 {
404 GrippedOnBack = true;
406 }
407 else
408 {
410 GrippedOnBack = false;
411 }
412
413 FRotator RelativeRot = GetRelativeRotation();
414 InitialGripToForwardVec = FRotator(RelativeRot.Pitch, RelativeRot.Yaw, TwistDiff).UnrotateVector(InitialGripToForwardVec);
415
416 }break;
417 default:break;
418 }
419
420
421
422
423 this->SetComponentTickEnabled(true);
424}
425
426void UVRMountComponent::OnGripRelease_Implementation(UGripMotionControllerComponent * ReleasingController, const FBPActorGripInformation & GripInformation, bool bWasSocketed)
427{
428 this->SetComponentTickEnabled(false);
429}
430
431void UVRMountComponent::SetGripPriority(int NewGripPriority)
432{
433 GripPriority = NewGripPriority;
434}
435
437void UVRMountComponent::OnChildGripRelease_Implementation(UGripMotionControllerComponent * ReleasingController, const FBPActorGripInformation & GripInformation, bool bWasSocketed) {}
438void UVRMountComponent::OnSecondaryGrip_Implementation(UGripMotionControllerComponent * GripOwningController, USceneComponent * SecondaryGripComponent, const FBPActorGripInformation & GripInformation) {}
439void UVRMountComponent::OnSecondaryGripRelease_Implementation(UGripMotionControllerComponent * GripOwningController, USceneComponent * ReleasingSecondaryGripComponent, const FBPActorGripInformation & GripInformation) {}
444void UVRMountComponent::OnInput_Implementation(FKey Key, EInputEvent KeyEvent) {}
445bool UVRMountComponent::RequestsSocketing_Implementation(USceneComponent *& ParentToSocketTo, FName & OptionalSocketName, FTransform_NetQuantize & RelativeTransform) { return false; }
446
451
456
458{
459 return false;
460}
461
462
467
472
473
478
483
484/*float UVRMountComponent::GripStiffness_Implementation()
485{
486return Stiffness;
487}
488
489float UVRMountComponent::GripDamping_Implementation()
490{
491return Damping;
492}*/
493void UVRMountComponent::GetGripStiffnessAndDamping_Implementation(float &GripStiffnessOut, float &GripDampingOut)
494{
495 GripStiffnessOut = Stiffness;
496 GripDampingOut = Damping;
497}
498
503
508
509/*void UVRMountComponent::ClosestSecondarySlotInRange_Implementation(FVector WorldLocation, bool & bHadSlotInRange, FTransform & SlotWorldTransform, UGripMotionControllerComponent * CallingController, FName OverridePrefix)
510{
511bHadSlotInRange = false;
512}
513
514void UVRMountComponent::ClosestPrimarySlotInRange_Implementation(FVector WorldLocation, bool & bHadSlotInRange, FTransform & SlotWorldTransform, UGripMotionControllerComponent * CallingController, FName OverridePrefix)
515{
516bHadSlotInRange = false;
517}*/
518
519void UVRMountComponent::ClosestGripSlotInRange_Implementation(FVector WorldLocation, bool bSecondarySlot, bool & bHadSlotInRange, FTransform & SlotWorldTransform, FName & SlotName, UGripMotionControllerComponent * CallingController, FName OverridePrefix)
520{
521 if (OverridePrefix.IsNone())
522 bSecondarySlot ? OverridePrefix = "VRGripS" : OverridePrefix = "VRGripP";
523
524 UVRExpansionFunctionLibrary::GetGripSlotInRangeByTypeName_Component(OverridePrefix, this, WorldLocation, bSecondarySlot ? SecondarySlotRange : PrimarySlotRange, bHadSlotInRange, SlotWorldTransform, SlotName, CallingController);
525}
526
531
532void UVRMountComponent::IsHeld_Implementation(TArray<FBPGripPair> & CurHoldingControllers, bool & bCurIsHeld)
533{
534 CurHoldingControllers.Empty();
535 if (HoldingGrip.IsValid())
536 {
537 CurHoldingControllers.Add(HoldingGrip);
538 bCurIsHeld = bIsHeld;
539 }
540 else
541 {
542 bCurIsHeld = false;
543 }
544}
545
546void UVRMountComponent::SetHeld_Implementation(UGripMotionControllerComponent * NewHoldingController, uint8 GripID, bool bNewIsHeld)
547{
548 if (bNewIsHeld)
549 {
550 HoldingGrip = FBPGripPair(NewHoldingController, GripID);
552 {
553 if (!bIsHeld)
555 bReplicateMovement = false;
556 }
557 }
558 else
559 {
562 {
564 }
565 }
566
567 bIsHeld = bNewIsHeld;
568}
569
570/*FBPInteractionSettings UVRMountComponent::GetInteractionSettings_Implementation()
571{
572 return FBPInteractionSettings();
573}*/
574
575
576bool UVRMountComponent::GetGripScripts_Implementation(TArray<UVRGripScriptBase*> & ArrayReference)
577{
578 return false;
579}
EGripMovementReplicationSettings
UENUM(Blueprintable)
ESecondaryGripType
UENUM(Blueprintable)
EGripCollisionType
UENUM(Blueprintable)
EGripLateUpdateSettings
UENUM(Blueprintable)
EGripInterfaceTeleportBehavior
UENUM(Blueprintable)
UCLASS(Blueprintable, meta = (BlueprintSpawnableComponent), ClassGroup = MotionController)
bool HasGripAuthority(const FBPActorGripInformation &Grip)
FVRGripControllerOnGripOutOfRange OnGripOutOfRange
UPROPERTY(BlueprintAssignable, Category = "GripMotionController")
bool DropObjectByInterface(UObject *ObjectToDrop=nullptr, uint8 GripIDToDrop=0, FVector OptionalAngularVelocity=FVector::ZeroVector, FVector OptionalLinearVelocity=FVector::ZeroVector)
UFUNCTION(BlueprintCallable, Category = "GripMotionController")
static void GetGripSlotInRangeByTypeName_Component(FName SlotType, USceneComponent *Component, FVector WorldLocation, float MaxRange, bool &bHadSlotInRange, FTransform &SlotWorldTransform, FName &SlotName, UGripMotionControllerComponent *QueryController=nullptr)
UFUNCTION(BlueprintPure, Category = "VRGrip", meta = (bIgnoreSelf = "true", DisplayName = "GetGripSlo...
static FTransform Interactible_GetCurrentParentTransform(USceneComponent *SceneComponentToCheck)
UFUNCTION(BlueprintPure, Category = "VRInteractibleFunctions", meta = (bIgnoreSelf = "true"))
UCLASS(Blueprintable, meta = (BlueprintSpawnableComponent), ClassGroup = (VRExpansionPlugin))
FVector InitialInteractorDropLocation
bool bReplicateMovement
UPROPERTY(EditAnywhere, Replicated, BlueprintReadWrite, Category = "VRGripInterface|Replication")
virtual void OnUnregister() override
float SecondarySlotRange
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GripSettings")
ESecondaryGripType SecondaryGripType_Implementation() override
FTransform InitialRelativeTransform
float PrimarySlotRange
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GripSettings")
float Damping
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
float FlipingZone
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRMountComponent")
virtual void BeginPlay() override
void TickGrip_Implementation(UGripMotionControllerComponent *GrippingController, const FBPActorGripInformation &GripInformation, float DeltaTime) override
FVector InitialInteractorLocation
UVRMountComponent(const FObjectInitializer &ObjectInitializer)
EGripCollisionType GetPrimaryGripType_Implementation(bool bIsSlot) override
void OnSecondaryGrip_Implementation(UGripMotionControllerComponent *GripOwningController, USceneComponent *SecondaryGripComponent, const FBPActorGripInformation &GripInformation) override
void OnChildGripRelease_Implementation(UGripMotionControllerComponent *ReleasingController, const FBPActorGripInformation &GripInformation, bool bWasSocketed=false) override
EGripMovementReplicationSettings GripMovementReplicationType_Implementation() override
void OnEndSecondaryUsed_Implementation() override
FBPGripPair HoldingGrip
UPROPERTY(BlueprintReadOnly, Category = "VRGripInterface")
FGameplayTagContainer GameplayTags
UPROPERTY(EditAnywhere, Replicated, BlueprintReadWrite, Category = "GameplayTags")
float BreakDistance
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
EGripMovementReplicationSettings MovementReplicationSetting
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
float Stiffness
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
void SetGripPriority(int NewGripPriority)
UFUNCTION(BlueprintCallable, Category = "GripSettings")
FBPAdvGripSettings AdvancedGripSettings_Implementation() override
void OnUsed_Implementation() override
void ClosestGripSlotInRange_Implementation(FVector WorldLocation, bool bSecondarySlot, bool &bHadSlotInRange, FTransform &SlotWorldTransform, FName &SlotName, UGripMotionControllerComponent *CallingController=nullptr, FName OverridePrefix=NAME_None) override
void SetHeld_Implementation(UGripMotionControllerComponent *NewHoldingController, uint8 GripID, bool bNewIsHeld) override
bool AllowsMultipleGrips_Implementation() override
virtual void OnRegister() override
float FlipReajustYawSpeed
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRMountComponent")
void IsHeld_Implementation(TArray< FBPGripPair > &CurHoldingControllers, bool &bCurIsHeld) override
void OnChildGrip_Implementation(UGripMotionControllerComponent *GrippingController, const FBPActorGripInformation &GripInformation) override
void OnGripRelease_Implementation(UGripMotionControllerComponent *ReleasingController, const FBPActorGripInformation &GripInformation, bool bWasSocketed=false) override
bool bDenyGripping
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface", meta = (ScriptName = "IsDen...
void OnInput_Implementation(FKey Key, EInputEvent KeyEvent) override
virtual void PreReplication(IRepChangedPropertyTracker &ChangedPropertyTracker) override
void OnSecondaryUsed_Implementation() override
void OnGrip_Implementation(UGripMotionControllerComponent *GrippingController, const FBPActorGripInformation &GripInformation) override
void OnEndUsed_Implementation() override
bool bIsHeld
UPROPERTY(BlueprintReadOnly, Category = "VRGripInterface", meta = (ScriptName = "IsCurrentlyHeld"))
virtual void TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override
bool bRepGameplayTags
UPROPERTY(EditAnywhere, Replicated, BlueprintReadWrite, Category = "VRGripInterface")
EVRInteractibleMountAxis MountRotationAxis
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRMountComponent")
bool GetGripScripts_Implementation(TArray< UVRGripScriptBase * > &ArrayReference) override
int GripPriority
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GripSettings")
bool SimulateOnDrop_Implementation() override
EGripLateUpdateSettings GripLateUpdateSetting_Implementation() override
bool RequestsSocketing_Implementation(USceneComponent *&ParentToSocketTo, FName &OptionalSocketName, FTransform_NetQuantize &RelativeTransform) override
EGripInterfaceTeleportBehavior TeleportBehavior_Implementation() override
void ResetInitialMountLocation()
UFUNCTION(BlueprintCallable, Category = "VRMountComponent")
void GetGripStiffnessAndDamping_Implementation(float &GripStiffnessOut, float &GripDampingOut) override
bool DenyGripping_Implementation(UGripMotionControllerComponent *GripInitiator=nullptr) override
void OnSecondaryGripRelease_Implementation(UGripMotionControllerComponent *GripOwningController, USceneComponent *ReleasingSecondaryGripComponent, const FBPActorGripInformation &GripInformation) override
float GripBreakDistance_Implementation() override
USTRUCT(BlueprintType, Category = "VRExpansionLibrary")
FTransform_NetQuantize RelativeTransform
UPROPERTY(BlueprintReadWrite, Category = "Settings")
uint8 GripID
UPROPERTY(BlueprintReadOnly, Category = "Settings")
float GripDistance
UPROPERTY(BlueprintReadOnly, NotReplicated, Category = "Settings")
USTRUCT(BlueprintType, Category = "VRExpansionLibrary")
USTRUCT(BlueprintType, Category = "VRExpansionLibrary")
uint8 GripID
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GripPair")
USTRUCT(BlueprintType, Category = "VRExpansionLibrary|TransformNetQuantize", meta = (HasNativeMake = ...