40 virtual
void BeginPlay() override;
41 virtual
void Tick(
float DeltaTime) override;
42 virtual
void SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) override;
43 virtual
void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
44 virtual
void PossessedBy(AController* NewController) override;
46 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "PixoVR")
47 float DefaultPlayerHeight;
50 UFUNCTION(BlueprintCallable)
void HandleTeleportLeftPressed();
51 UFUNCTION(BlueprintCallable)
void HandleTeleportLeftReleased();
52 UFUNCTION(BlueprintCallable)
void HandleTeleportRightPressed();
53 UFUNCTION(BlueprintCallable)
void HandleTeleportRightReleased();
55 UFUNCTION(BlueprintCallable)
void HandleTeleportLeftByAxis(
float CurrentAxisValue);
56 UFUNCTION(BlueprintCallable)
void HandleTeleportRightByAxis(
float CurrentAxisValue);
58 UFUNCTION(Server, Unreliable, WithValidation)
59 void HandleTeleportLeftUp(
float Value);
61 UFUNCTION(Server, Unreliable, WithValidation)
62 void HandleTeleportLeftRight(
float Value);
64 UFUNCTION(Server, Unreliable, WithValidation)
65 void HandleTeleportRightUp(
float Value);
67 UFUNCTION(Server, Unreliable, WithValidation)
68 void HandleTeleportRightRight(
float Value);
70 virtual
bool CanTeleport() const;
73 void ExecuteTeleportation(EControllerHand Hand);
76 UFUNCTION(BlueprintCallable, Category = "PixoVR")
77 void ActivateTeleporter(EControllerHand Hand,
bool InActivate);
79 UFUNCTION(BlueprintCallable, Category = "PixoVR")
80 void SpawnNewTeleporterClass(TSubclassOf<
ATeleporterBase> TeleporterClass);
82 UFUNCTION(BlueprintCallable, Server, Reliable, WithValidation, Category = "PixoVR")
83 void NotifyActivateTeleporter(EControllerHand Hand,
bool InActivate);
85 UFUNCTION(BlueprintCallable, NetMulticast, Reliable, Category = "PixoVR")
86 void MulticastActivateTeleporter(EControllerHand Hand,
bool InActivate);
89 void SpawnTeleporter(EControllerHand Hand,
bool InActivate);
91 UPROPERTY(BlueprintReadWrite, Category = "PixoVR")
92 bool bLaserBeamActive;
94 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PixoVR")
95 FName LeftTeleporterSocket;
97 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PixoVR")
98 FName RightTeleporterSocket;
100 UPROPERTY(BlueprintReadOnly, Replicated, Category = "PixoVR")
103 UPROPERTY(BlueprintReadOnly, Replicated, Category = "PixoVR")
106 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PixoVR")
110 UPROPERTY(EditAnywhere, Replicated, BlueprintReadWrite, Category = "PixoVR")
111 bool bTeleporterEnabled = true;
113 UPROPERTY(EditAnywhere, Replicated, BlueprintReadWrite, Category = "PixoVR")
114 bool bRotationByControllerEnabled = true;
116 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "PixoVR")
117 bool bTeleportSoundsEnabled = false;
119 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "PixoVR", meta = (EditCondition = "bTeleportSoundsEnabled", EditConditionHides))
120 USoundCue* TeleportSoundCue;
122 FOnTeleportationActivated& OnTeleportationActivated() {
return OnTeleportationActivatedEvent; };
125 UFUNCTION(BlueprintCallable)
void HandleLaserBeamLeftPressed();
126 UFUNCTION(BlueprintCallable)
void HandleLaserBeamRightPressed();
128 UFUNCTION (BlueprintCallable, BlueprintPure)
129 void IsLaserActivated (
bool& IsActivated, EControllerHand& Hand);
131 UFUNCTION(Server, Reliable, WithValidation)
132 void IsOverWidgetUse(EControllerHand Hand,
bool InPressed);
134 UFUNCTION(Client, Reliable)
135 void PerformIsOverWidgetUse(EControllerHand Hand,
bool InPressed);
137 UFUNCTION(Server, Reliable)
138 void HandleLaserSelectEvent(EControllerHand Hand,
bool Pressed);
139 UFUNCTION(NetMulticast, Reliable)
140 void MultiHandleLaserSelectEvent(EControllerHand Hand,
bool Pressed);
142 void HandleLaserSelect(EControllerHand Hand,
bool Pressed);
145 void SpawnLaserBeam(EControllerHand Hand,
bool InActivate);
149 void HandleLaserSelectLeft();
150 void HandleLaserReleaseLeft();
151 void HandleLaserSelectRight();
152 void HandleLaserReleaseRight();
155 UFUNCTION(BlueprintCallable, Server, Reliable, WithValidation, Category = "PixoVR")
156 void ActivateLaserBeam(EControllerHand Hand,
bool InActivate);
158 UFUNCTION(BlueprintImplementableEvent, BlueprintCallable, Category ="PixoVR")
159 void HandleHandAnimationLaser(EControllerHand Hand);
161 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PixoVR")
162 FName LeftLaserBeamSocket;
164 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PixoVR")
165 FName RightLaserBeamSocket;
167 UPROPERTY(BlueprintReadOnly, Replicated, Category = "PixoVR")
170 UPROPERTY(BlueprintReadOnly, Replicated, Category = "PixoVR")
173 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "PixoVR")
174 bool bLeftLaserBeamIsActiveOnStart;
176 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "PixoVR")
177 bool bRightLaserBeamIsActiveOnStart;
179 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PixoVR")
182 UPROPERTY(BlueprintReadOnly, Replicated)
183 bool bActivateLeftLaser;
185 UPROPERTY(BlueprintReadOnly, Replicated)
186 bool bActivateRightLaser;
189 UFUNCTION(BlueprintCallable)
190 void HandleActivateWristMenuPressed();
192 UFUNCTION(BlueprintCallable)
193 void HandleSelectWristMenuItemPressed();
195 UFUNCTION(BlueprintCallable)
196 void SelectWristMenu(EControllerHand Hand);
198 UFUNCTION(BlueprintCallable)
199 void HandleActivateWristMenuPressedLeft();
201 UFUNCTION(BlueprintCallable)
202 void HandleActivateWristMenuPressedRight();
204 UFUNCTION(Server, Reliable, WithValidation)
205 void SpawnWristMenu();
207 UFUNCTION(Server, Reliable, WithValidation)
208 void SpawnProgressBar();
211 UFUNCTION(BlueprintCallable, Server, Reliable, WithValidation, Category = "PixoVR")
212 void ActivateWristMenu(EControllerHand Hand);
214 UFUNCTION(BlueprintCallable, Server, Reliable, WithValidation, Category = "PixoVR")
215 void ActivateProgressBar(EControllerHand Hand,
bool InActivate);
217 virtual
void HandleSelectWristMenuItemPressedLeft();
218 virtual
void HandleSelectWristMenuItemPressedRight();
220 virtual
void HandleWristMenuItem1Pressed();
221 virtual
void HandleWristMenuItem2Pressed();
222 virtual
void HandleWristMenuItem3Pressed();
223 virtual
void HandleWristMenuItem4Pressed();
224 virtual
void HandleWristMenuItem5Pressed();
225 virtual
void HandleWristMenuItem6Pressed();
226 virtual
void HandleWristMenuItem7Pressed();
227 virtual
void HandleWristMenuItem8Pressed();
229 virtual
void HandleWristMenuDoubleTap(FKey InputKey);
231 UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "PixoVR")
234 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PixoVR")
237 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PixoVR")
240 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PixoVR")
241 FName WristMenuSocket;
243 UPROPERTY(BlueprintReadOnly, Replicated, Category = "PixoVR", meta = (AllowPrivateAccess = "true"))
246 UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "PixoVR", meta = (AllowPrivateAccess = "true"))
249 UPROPERTY(BlueprintReadOnly, Replicated, Category = "PixoVR", meta = (AllowPrivateAccess = "true"))
252 FVector MirroredWristMenuScale;
254 UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Replicated, Category= "PixoVR")
255 EControllerHand CurrentWristMenuHand;
257 UPROPERTY(BlueprintAssignable)
258 FOnWristMenuActivated OnWristMenuActivated;
262 virtual
void TurnVRByAxis(
float Value);
263 virtual
void TurnVRLeft();
264 virtual
void TurnVRRight();
267 UFUNCTION(NetMulticast, Reliable)
268 void ActivateFPSMode(
bool Enable);
270 void MoveForward(
float Value);
271 void MoveRight(
float Value);
272 void TurnAtRate(
float Rate);
273 void LookUpAtRate(
float Rate);
276 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Hands")
279 UPROPERTY(BlueprintReadOnly, Category = "Hands")
281 UPROPERTY(BlueprintReadOnly, Category = "Hands")
284 UFUNCTION(BlueprintCallable, Category = "Hands")
285 virtual
void GrabRightPressed();
286 UFUNCTION(BlueprintCallable, Category = "Hands")
287 virtual
void GrabLeftPressed();
288 UFUNCTION(BlueprintCallable, Category = "Hands")
289 virtual
void GrabRightReleased();
290 UFUNCTION(BlueprintCallable, Category = "Hands")
291 virtual
void GrabLeftReleased();
293 void ReleasedRightHand();
294 void ReleasedLeftHand();
302 UFUNCTION(BlueprintCallable, Category = "Hands")
303 AActor* SpawnActorInHand(TSubclassOf<
AActor> ActorClass,
bool RightHand);
305 UFUNCTION(BlueprintCallable, Category = "Hands")
306 void ResetHandHoldingObject();
311 UFUNCTION(BlueprintCallable, Category = "Hands")
312 void ResetHand(
bool RightHand);
316 UFUNCTION(BlueprintCallable)
317 void ShowTool(EControllerHand Hand,
AActor* Tool);
319 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PixoVR")
322 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Fade")
323 UStaticMeshComponent* FadeSphere;
325 UPROPERTY(BlueprintAssignable, Category = "Hands")
326 FOnHandGrabAction OnHandGrabAction;
328 UPROPERTY(BlueprintAssignable, Category = "Hands")
329 FOnCameraRotatedByController OnCameraRotatedByController;
332 UPROPERTY(BlueprintReadOnly)
335 UFUNCTION(BlueprintCallable, Category = "Hint")
337 UFUNCTION(BlueprintCallable, Category = "Hint")
338 void DeactivateHint();
341 float BaseLookUpRate;
342 float DeflectionAngle = 30.0f;
344 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="PixoVR", Meta=(Tooltip="If checked, Laser, Teleporter and Wrist Menu input handling will be disabled."))
345 bool bDisableToolsInputBindings;
347 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category="PixoVR")
348 UDataTable* InputsTable;
350 UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "PixoVR", meta = (AllowPrivateAccess = "true"))
351 UStaticMeshComponent* Head;
353 UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "PixoVR", meta = (AllowPrivateAccess = "true"))
354 UStaticMeshComponent* Body;
356 FVector2D LastTeleportLeftDirectionVector;
357 FVector2D LastTeleportRightDirectionVector;
363 void PlayerDestroyed(
AActor* Act);
370 FOnTeleportationActivated OnTeleportationActivatedEvent;
372 UPROPERTY(Replicated)
373 bool bIsOverWidgetUse = false;