4#include "Net/UnrealNetwork.h"
8 : Super(ObjectInitializer)
33void UGrippableCapsuleComponent::GetLifetimeReplicatedProps(TArray< class FLifetimeProperty > & OutLifetimeProps)
const
35 Super::GetLifetimeReplicatedProps(OutLifetimeProps);
47 Super::PreReplication(ChangedPropertyTracker);
61 bool WroteSomething = Super::ReplicateSubobjects(Channel, Bunch, RepFlags);
67 if (Script && !Script->IsPendingKill())
69 WroteSomething |= Channel->ReplicateSubobject(Script, *Bunch, *RepFlags);
74 return WroteSomething;
92 Script->BeginPlay(
this);
102 Super::EndPlay(EndPlayReason);
109 Script->EndPlay(EndPlayReason);
192 if (OverridePrefix.IsNone())
193 bSecondarySlot ? OverridePrefix =
"VRGripS" : OverridePrefix =
"VRGripP";
261 Super::PreDestroyFromReplication();
268 SubObject->PreDestroyFromReplication();
269 SubObject->MarkPendingKill();
284 ObjList.Add(SubObject);
293 Super::OnComponentDestroyed(bDestroyingHierarchy);
296 if (UWorld * World = GetWorld())
298 EWorldType::Type WorldType = World->WorldType;
299 if (WorldType == EWorldType::Editor || WorldType == EWorldType::EditorPreview)
309 SubObject->MarkPendingKill();
EGripMovementReplicationSettings
UENUM(Blueprintable)
@ ForceClientSideMovement
@ ForceServerSideMovement
ESecondaryGripType
UENUM(Blueprintable)
EGripCollisionType
UENUM(Blueprintable)
EGripLateUpdateSettings
UENUM(Blueprintable)
EGripInterfaceTeleportBehavior
UENUM(Blueprintable)
UCLASS(Blueprintable, meta = (BlueprintSpawnableComponent), ClassGroup = MotionController)
UCLASS(Blueprintable, meta = (BlueprintSpawnableComponent, ChildCanTick), ClassGroup = (VRExpansionPl...
bool bOriginalReplicatesMovement
virtual EGripInterfaceTeleportBehavior TeleportBehavior_Implementation() override
virtual void OnInput_Implementation(FKey Key, EInputEvent KeyEvent) override
virtual void OnSecondaryGripRelease_Implementation(UGripMotionControllerComponent *GripOwningController, USceneComponent *ReleasingSecondaryGripComponent, const FBPActorGripInformation &GripInformation) override
virtual bool DenyGripping_Implementation(UGripMotionControllerComponent *GripInitiator=nullptr) override
bool bReplicateMovement
UPROPERTY(EditAnywhere, Replicated, BlueprintReadWrite, Category = "VRGripInterface|Replication")
virtual void OnComponentDestroyed(bool bDestroyingHierarchy) override
virtual void GetGripStiffnessAndDamping_Implementation(float &GripStiffnessOut, float &GripDampingOut) override
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override
FVROnDropSignature OnDropped
UPROPERTY(BlueprintAssignable, Category = "Grip Events")
virtual EGripCollisionType GetPrimaryGripType_Implementation(bool bIsSlot) override
virtual void OnChildGrip_Implementation(UGripMotionControllerComponent *GrippingController, const FBPActorGripInformation &GripInformation) override
virtual void OnSecondaryUsed_Implementation() override
virtual void IsHeld_Implementation(TArray< FBPGripPair > &HoldingControllers, bool &bIsHeld) override
void SetDenyGripping(bool bDenyGripping)
UFUNCTION(BlueprintCallable, Category = "VRGripInterface")
virtual bool GetGripScripts_Implementation(TArray< UVRGripScriptBase * > &ArrayReference) override
virtual bool AllowsMultipleGrips_Implementation() override
virtual void PreReplication(IRepChangedPropertyTracker &ChangedPropertyTracker) override
virtual FBPAdvGripSettings AdvancedGripSettings_Implementation() override
bool bReplicateGripScripts
UPROPERTY(EditAnywhere, Replicated, BlueprintReadWrite, Category = "VRGripInterface")
virtual void PreDestroyFromReplication() override
virtual void ClosestGripSlotInRange_Implementation(FVector WorldLocation, bool bSecondarySlot, bool &bHadSlotInRange, FTransform &SlotWorldTransform, FName &SlotName, UGripMotionControllerComponent *CallingController=nullptr, FName OverridePrefix=NAME_None) override
virtual void GetSubobjectsWithStableNamesForNetworking(TArray< UObject * > &ObjList) override
FGameplayTagContainer GameplayTags
UPROPERTY(EditAnywhere, Replicated, BlueprintReadWrite, Category = "GameplayTags")
FBPInterfaceProperties VRGripInterfaceSettings
UPROPERTY(EditAnywhere, Replicated, BlueprintReadWrite, Category = "VRGripInterface")
virtual void OnUsed_Implementation() override
virtual void OnGrip_Implementation(UGripMotionControllerComponent *GrippingController, const FBPActorGripInformation &GripInformation) override
virtual void OnGripRelease_Implementation(UGripMotionControllerComponent *ReleasingController, const FBPActorGripInformation &GripInformation, bool bWasSocketed=false) override
virtual void OnEndSecondaryUsed_Implementation() override
virtual ESecondaryGripType SecondaryGripType_Implementation() override
~UGrippableCapsuleComponent()
virtual void OnEndUsed_Implementation() override
bool ReplicateSubobjects(UActorChannel *Channel, class FOutBunch *Bunch, FReplicationFlags *RepFlags) override
virtual bool RequestsSocketing_Implementation(USceneComponent *&ParentToSocketTo, FName &OptionalSocketName, FTransform_NetQuantize &RelativeTransform) override
virtual bool SimulateOnDrop_Implementation() override
virtual EGripMovementReplicationSettings GripMovementReplicationType_Implementation() override
FVROnGripSignature OnSecondaryGripRemoved
UPROPERTY(BlueprintAssignable, Category = "Grip Events")
virtual float GripBreakDistance_Implementation() override
void SetGripPriority(int NewGripPriority)
UFUNCTION(BlueprintCallable, Category = "VRGripInterface")
virtual void Native_NotifyThrowGripDelegates(UGripMotionControllerComponent *Controller, bool bGripped, const FBPActorGripInformation &GripInformation, bool bWasSocketed=false) override
TArray< class UVRGripScriptBase * > GripLogicScripts
UPROPERTY(EditAnywhere, Replicated, BlueprintReadOnly, Instanced, Category = "VRGripInterface")
FVROnGripSignature OnSecondaryGripAdded
UPROPERTY(BlueprintAssignable, Category = "Grip Events")
virtual void BeginPlay() override
UGrippableCapsuleComponent(const FObjectInitializer &ObjectInitializer)
FVROnGripSignature OnGripped
UPROPERTY(BlueprintAssignable, Category = "Grip Events")
virtual void OnSecondaryGrip_Implementation(UGripMotionControllerComponent *GripOwningController, USceneComponent *SecondaryGripComponent, const FBPActorGripInformation &GripInformation) override
virtual void OnChildGripRelease_Implementation(UGripMotionControllerComponent *ReleasingController, const FBPActorGripInformation &GripInformation, bool bWasSocketed=false) override
virtual EGripLateUpdateSettings GripLateUpdateSetting_Implementation() override
bool bRepGripSettingsAndGameplayTags
UPROPERTY(EditAnywhere, Replicated, BlueprintReadWrite, Category = "VRGripInterface|Replication")
virtual void SetHeld_Implementation(UGripMotionControllerComponent *HoldingController, uint8 GripID, bool bIsHeld) override
virtual void TickGrip_Implementation(UGripMotionControllerComponent *GrippingController, const FBPActorGripInformation &GripInformation, float DeltaTime) override
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...
UCLASS(NotBlueprintable, BlueprintType, EditInlineNew, DefaultToInstanced, Abstract,...
USTRUCT(BlueprintType, Category = "VRExpansionLibrary")
uint8 GripPriority
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AdvancedGripSettings")
USTRUCT(BlueprintType, Category = "VRExpansionLibrary")
ESecondaryGripType SecondaryGripType
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
bool bDenyGripping
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
EGripCollisionType FreeDefaultGripType
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
float ConstraintBreakDistance
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
bool bAllowMultipleGrips
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
float SecondarySlotRange
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
EGripLateUpdateSettings LateUpdateSetting
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
EGripCollisionType SlotDefaultGripType
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
EGripInterfaceTeleportBehavior OnTeleportBehavior
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
float ConstraintStiffness
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
float PrimarySlotRange
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
bool bIsHeld
UPROPERTY(BlueprintReadWrite, NotReplicated, Category = "VRGripInterface")
TArray< FBPGripPair > HoldingControllers
UPROPERTY(BlueprintReadWrite, NotReplicated, Category = "VRGripInterface")
float ConstraintDamping
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
FBPAdvGripSettings AdvancedGripSettings
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface|AdvancedGripSettings")
EGripMovementReplicationSettings MovementReplicationType
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")
bool bSimulateOnDrop
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRGripInterface")