31 virtual
void BeginPlay() override;
32 virtual
void Tick(
float DeltaSeconds) override;
35 virtual
void OnOverlapBegin(UPrimitiveComponent* OverlappedComp,
AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex,
bool FromSweep, const FHitResult& SweepResult);
37 UFUNCTION(Server, Reliable, WithValidation)
38 void ServerStartPlayingSound(USoundBase* Sound, const FVector& SoundLocation,
float VolumeMultiplier = 1.0f);
40 UFUNCTION(Server, Reliable, WithValidation)
41 void ServerStopPlayingSound(USoundBase* Sound);
43 UFUNCTION(Server, Reliable, WithValidation)
44 void ServerStartPlayingSoundViaComponent(USoundBase* Sound,
float VolumeMultiplier = 1.0f);
46 UFUNCTION(Server, Reliable, WithValidation)
47 void ServerStopPlayingSoundViaComponent();
49 UFUNCTION(Server, Reliable, WithValidation)
50 void ServerAdjustPlayingSoundVolumeViaComponent(
float InVolumeMultiplier = 1.0f);
52 UFUNCTION(Server, Reliable, WithValidation)
53 void ServerOnDropped();
55 bool IsRightHand(UGripMotionControllerComponent* GrippingController) const;
59 virtual
void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
61 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVRToolbox | Tools")
64 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVRToolbox | Tools")
67 UFUNCTION(BlueprintCallable, Category = Tool)
72 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVRToolbox | Tools")
74 virtual
void InitializeTool_Implementation(const
FPixoToolData& InToolData) override;
78 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
79 bool DenyGrippingPixoVR(UGripMotionControllerComponent* GrippingController);
80 virtual
bool DenyGrippingPixoVR_Implementation(UGripMotionControllerComponent* GrippingController) override;
83 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
84 bool DenyTriggerGripping();
85 virtual
bool DenyTriggerGripping_Implementation() override;
88 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
90 virtual
bool DenyDropping_Implementation() override;
93 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
94 void OnGripObject(UGripMotionControllerComponent* GrippingController,
AActor* GrippedActor);
95 virtual
void OnGripObject_Implementation(UGripMotionControllerComponent* GrippingController,
AActor* GrippedActor) override;
98 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
99 void OnTryGripObject(UGripMotionControllerComponent* GrippingController,
AActor* GrippedActor);
100 virtual
void OnTryGripObject_Implementation(UGripMotionControllerComponent* GrippingController,
AActor* GrippedActor) override;
103 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
104 void OnGripObjectRelease(UGripMotionControllerComponent* GrippingController,
AActor* GrippedActor);
105 virtual
void OnGripObjectRelease_Implementation(UGripMotionControllerComponent* GrippingController,
AActor* GrippedActor) override;
108 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
113 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
114 void GripTriggerTransform(UGripMotionControllerComponent* GrippingController,
bool& bUseCustomTransform, FTransform& CustomTransform);
115 virtual
void GripTriggerTransform_Implementation(UGripMotionControllerComponent* GrippingController,
bool& bUseCustomTransform, FTransform& CustomTransform) override;
118 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
123 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
124 bool DisablePhysicsOnDrop();
125 virtual
bool DisablePhysicsOnDrop_Implementation() override;
127 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
128 void OnObjectPaused();
129 virtual
void OnObjectPaused_Implementation() override;
131 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PixoVR | Grip Interface")
132 void OnObjectUnPaused();
133 virtual
void OnObjectUnPaused_Implementation() override;
136 bool DestroyOnExit() {
return bDestroyOnExit; }
137 bool CanExitsWithoutOwner()
const {
return ToolData.CanExistWithoutOwner; }
140 UFUNCTION(NetMulticast, Reliable)
141 void MulticastStartPlayingSound(USoundBase* Sound,
const FVector& SoundLocation,
float VolumeMultiplier);
143 UFUNCTION(NetMulticast, Reliable)
144 void MulticastStopPlayingSound(USoundBase* Sound);
146 UFUNCTION(NetMulticast, Reliable)
147 void MulticastStartPlayingSoundViaComponent(USoundBase* Sound,
float VolumeMultiplier);
149 UFUNCTION(NetMulticast, Reliable)
150 void MulticastStopPlayingSoundViaComponent();
152 UFUNCTION(NetMulticast, Reliable)
153 void MulticastAdjustPlayingSoundVolumeViaComponent(
float InVolumeMultiplier);
155 UFUNCTION(NetMulticast, Reliable)
156 void MulticastToggleCollision(ECollisionEnabled::Type Type);
158 UFUNCTION(Server, Reliable, WithValidation)
159 void ServerUseTool(UGripMotionControllerComponent* GrippingController,
AActor* GrippedActor);
161 UFUNCTION(Server, Reliable, WithValidation)
162 void ServerDestroyTool();
164 USoundAttenuation* GetDefaultAttenuationSettings();
167#pragma region Components
168 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Tool)
169 UStaticMeshComponent* ToolMeshComponent;
171 UPROPERTY(VisibleAnywhere, Category = Tool)
172 UBoxComponent* GrabBoxComponent;
174 UPROPERTY(VisibleAnywhere, Category = Tool)
175 UAudioComponent* AudioComponent;
178 USoundAttenuation* DefaultAttenuationSettings;
180#pragma endregion Components
182#pragma region Variables
183 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = GripBehavior)
184 USoundBase* GripSound;
186 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = DropBehavior)
189 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = DropBehavior)
192 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = DropBehavior)
195 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = DropBehavior)
198 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = GripBehavior)
199 bool bToggleCollisionOnUsage;
201 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = TransformOffset)
202 FTransform RightHandGrip;
204 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = TransformOffset)
205 FTransform LeftHandGrip;
206#pragma endregion Variables
209 UPROPERTY(Replicated, BlueprintReadOnly, Category = ToolData)
212 UPROPERTY(Replicated, BlueprintReadOnly, Category = GripBehavior)
213 EControllerHand GrabHand;
215 UPROPERTY(Replicated, BlueprintReadOnly, Category = GripBehavior)
218 UPROPERTY(BlueprintReadOnly, Category = GripBehavior)
221 FGripAction OnGripAction;
223 UPROPERTY(Replicated, BlueprintReadOnly, Category = ToolBehavior)
229 float TimeBeforeKilled;
232#pragma endregion State