5#include "CoreMinimal.h"
7#include "PixoVRTeleporter.generated.h"
10class UStaticMeshComponent;
12class UMaterialInstance;
13class UGripMotionControllerComponent;
14class UNavigationSystemV1;
15class USplineMeshComponent;
16class UVRBaseCharacterMovementComponent;
36 virtual
void ActivateTeleporter(
bool InActivate) override;
46 virtual
void ExecuteTeleportation(UVRBaseCharacterMovementComponent* MovementComponent,
47 const FTransform& ActorTransform, const FVector& VRLocation,
48 const FRotator& ActorRotation) override;
51 virtual
void BeginPlay() override;
64 bool TraceTeleportDestination(TArray<FVector>& TracePoints, FVector& TraceLocation, FVector& NavMeshLocation);
71 void UpdateTeleportCylinder(const FVector& NewLocation,
bool ValidLocationFound);
77 virtual
void TickTeleporter(
float DeltaTime) override;
79 UPROPERTY(VisibleDefaultsOnly, BlueprintReadWrite)
80 UStaticMeshComponent* TeleportCylinder;
82 UPROPERTY(VisibleDefaultsOnly, BlueprintReadWrite)
83 UStaticMeshComponent* Ring;
85 UPROPERTY(EditAnywhere, Category = "PixoVR | Teleporter")
86 bool bDrawTeleportCylinder;
88 UPROPERTY(EditAnywhere, Category = "PixoVR | Teleporter")
89 FLinearColor TeleportFadeColor;
92 UNavigationSystemV1* NavigationSystem;
93 UVRBaseCharacterMovementComponent* MovementComponent;
96 virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
override;
DECLARE_LOG_CATEGORY_EXTERN(LogPixoVRTeleporter, Log, All)
Class for VR teleporter functionality. It allows teleportation using visual indicators.
FLinearColor TeleportFadeColor
UPROPERTY(EditAnywhere, Category = "PixoVR | Teleporter")
bool bDrawTeleportCylinder
UPROPERTY(EditAnywhere, Category = "PixoVR | Teleporter")
UStaticMeshComponent * TeleportCylinder
UPROPERTY(VisibleDefaultsOnly, BlueprintReadWrite)
UStaticMeshComponent * Ring
UPROPERTY(VisibleDefaultsOnly, BlueprintReadWrite)
UVRBaseCharacterMovementComponent * MovementComponent
UNavigationSystemV1 * NavigationSystem
virtual void ActivateTeleporter(bool InActivate)
Activate or deactivate the Teleporter.
virtual void ExecuteTeleportation(UVRBaseCharacterMovementComponent *MovementComponent, const FTransform &ActorTransform, const FVector &VRLocation, const FRotator &ActorRotation) PURE_VIRTUAL(
Execute the teleportation. It checks if there is a valid teleport destination before executing the te...
virtual void BeginPlay() override
virtual void TickTeleporter(float DeltaTime) PURE_VIRTUAL(
Tick the Teleporter.