Documentation for the Unreal C++ Plugin
Loading...
Searching...
No Matches
ATeleporterBase Class ReferenceAbstract

UCLASS(Abstract) More...

#include <TeleporterBase.h>

Inheritance diagram for ATeleporterBase:
[legend]

Public Member Functions

 ATeleporterBase ()
 
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 teleportation. The teleport destination is determined based on the last valid location of the teleport cylinder.
 
virtual void GetLifetimeReplicatedProps (TArray< FLifetimeProperty > &OutLifetimeProps) const override
 
void GetTeleportationTransform (FVector &Location, FVector &ForwardVector)
 Get the teleportation transform which includes location and orientation.
 
virtual void FVector GetTeleportDestination (const FVector &OriginalLocation)
 Get the teleport destination.
 
virtual bool IsActivated ()
 Check if the teleporter is activated.
 
virtual void SetMotionController (UGripMotionControllerComponent *InMotionController)
 Set the motion controller that controls this Teleport.
 
virtual void UpdateMotionControllerRotation (const FVector2D &Direction)
 Update the motion controller rotation for pad rotation.
 

Public Attributes

UStaticMeshComponent * ArcEndPoint
 UPROPERTY(VisibleDefaultsOnly, BlueprintReadWrite)
 
USplineComponent * ArcSplineComponent
 UPROPERTY(VisibleDefaultsOnly, BlueprintReadWrite)
 
UMaterialArcSplineMaterial
 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PixoVR | Teleporter", Meta = (AllowPrivateAccess = "true"))
 
UStaticMesh * ArcSplineMesh
 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PixoVR | Teleporter", Meta = (AllowPrivateAccess = "true"))
 
UStaticMeshComponent * Arrow
 UPROPERTY(VisibleDefaultsOnly, BlueprintReadWrite)
 
bool bActivateOneTeleporterAtTime = false
 UPROPERTY(BlueprintReadOnly, Category = "PixoVR | Teleporter")
 
bool bDrawArcSpline
 UPROPERTY(EditAnywhere, Category = "PixoVR | Teleporter")
 
bool bDrawTeleportArrow
 UPROPERTY(EditAnywhere, Category = "PixoVR | Teleporter")
 
bool bIsTeleporterActive
 UPROPERTY(BlueprintReadOnly, Category = "PixoVR | Teleporter")
 
bool bIsValidTeleportDestination
 UPROPERTY(BlueprintReadOnly, Category = "PixoVR | Teleporter")
 
float FadeInDuration
 UPROPERTY(EditAnywhere, Category = "PiUpdateMotionControllerRotationxoVR | Teleporter")
 
float FadeOutDuration
 UPROPERTY(EditAnywhere, Category = "PixoVR | Teleporter")
 
UGripMotionControllerComponent * MotionController
 UPROPERTY(Replicated)
 
FRotator PadRotation
 UPROPERTY(BlueprintReadOnly, Category = "PixoVR | Teleporter")
 
float TeleportLaunchVelocity
 UPROPERTY(EditAnywhere, Category = "PixoVR | Teleporter")
 
FRotator TeleportRotation
 UPROPERTY(BlueprintReadOnly, Category = "PixoVR | Teleporter")
 
float ThumbDeadZone
 UPROPERTY(EditAnywhere, Category = "PixoVR | Teleporter")
 

Protected Member Functions

virtual void BeginPlay () override
 
virtual void Destroyed () override
 
virtual void Tick (float DeltaTime) override
 
virtual void UpdateArcEndpoint (const FVector &NewLocation, bool ValidLocationFound)
 Update the endpoint of the arc spline.
 
virtual void UpdateArcSpline (TArray< FVector > &SplinePoints, bool ValidLocationFound)
 Update the arc spline.
 

Protected Attributes

FVector TimedLocation
 
FRotator TimedRotation
 

Private Member Functions

virtual void virtual void ClearArc ()
 Clear the arc spline.
 
 GENERATED_BODY ()
 
FRotator GetRotationFromInput (const FVector2D &Direction)
 Calculate the FRotator from the pad of a controller.
 
virtual void TickTeleporter (float DeltaTime) PURE_VIRTUAL(
 Tick the Teleporter.
 

Private Attributes

TArray< USplineMeshComponent * > SplineMeshComponents
 

Detailed Description

UCLASS(Abstract)

Definition at line 17 of file TeleporterBase.h.

Constructor & Destructor Documentation

◆ ATeleporterBase()

ATeleporterBase::ATeleporterBase ( )

Definition at line 10 of file TeleporterBase.cpp.

Member Function Documentation

◆ ActivateTeleporter()

void ATeleporterBase::ActivateTeleporter ( bool InActivate)
virtualBlueprintCallable

Activate or deactivate the Teleporter.

Parameters
InActivateWhether to activate or deactivate the Teleporter.

UFUNCTION(BlueprintCallable, Category = "PixoVR | Teleporter")

Reimplemented in ABySpotTeleporter, and APixoVRTeleporter.

Definition at line 184 of file TeleporterBase.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BeginPlay()

void ATeleporterBase::BeginPlay ( )
overrideprotectedvirtual

Reimplemented in ABySpotTeleporter, and APixoVRTeleporter.

Definition at line 75 of file TeleporterBase.cpp.

◆ ClearArc()

void ATeleporterBase::ClearArc ( )
privatevirtual

Clear the arc spline.

Definition at line 165 of file TeleporterBase.cpp.

Here is the caller graph for this function:

◆ Destroyed()

void ATeleporterBase::Destroyed ( )
overrideprotectedvirtual

Definition at line 177 of file TeleporterBase.cpp.

Here is the call graph for this function:

◆ ExecuteTeleportation()

virtual void ATeleporterBase::ExecuteTeleportation ( UVRBaseCharacterMovementComponent * MovementComponent,
const FTransform & ActorTransform,
const FVector & VRLocation,
const FRotator & ActorRotation )
virtualBlueprintCallable

Execute the teleportation. It checks if there is a valid teleport destination before executing the teleportation. The teleport destination is determined based on the last valid location of the teleport cylinder.

Parameters
MovementComponentThe movement component of the character.
ActorTransformThe transform of the character.
VRLocationThe HMD location (usually you can get it by GetVRLocation()).
ActorRotationThe rotation of the character.

UFUNCTION(BlueprintCallable, Category = "PixoVR | Teleporter")

Reimplemented in ABySpotTeleporter, and APixoVRTeleporter.

Here is the caller graph for this function:

◆ GENERATED_BODY()

ATeleporterBase::GENERATED_BODY ( )
private

◆ GetLifetimeReplicatedProps()

void ATeleporterBase::GetLifetimeReplicatedProps ( TArray< FLifetimeProperty > & OutLifetimeProps) const
overridevirtual

Definition at line 236 of file TeleporterBase.cpp.

◆ GetRotationFromInput()

FRotator ATeleporterBase::GetRotationFromInput ( const FVector2D & Direction)
private

Calculate the FRotator from the pad of a controller.

Parameters
DirectionThe direction of the pad.
Returns
The calculated FRotator.

Definition at line 253 of file TeleporterBase.cpp.

Here is the caller graph for this function:

◆ GetTeleportationTransform()

void ATeleporterBase::GetTeleportationTransform ( FVector & Location,
FVector & ForwardVector )
BlueprintPure

Get the teleportation transform which includes location and orientation.

Parameters
LocationThe teleportation location.
ForwardVectorThe forward vector for orientation.

UFUNCTION(BlueprintPure, Category = "PixoVR | Teleporter")

Definition at line 230 of file TeleporterBase.cpp.

Here is the caller graph for this function:

◆ GetTeleportDestination()

FVector ATeleporterBase::GetTeleportDestination ( const FVector & OriginalLocation)
BlueprintPure

Get the teleport destination.

Parameters
OriginalLocationDesired teleport location.
Returns
The teleport destination.

UFUNCTION(BlueprintPure, Category = "PixoVR | Teleporter")

Definition at line 222 of file TeleporterBase.cpp.

Here is the caller graph for this function:

◆ IsActivated()

bool ATeleporterBase::IsActivated ( )
virtualBlueprintCallable

Check if the teleporter is activated.

Returns
True if the teleporter is activated, false otherwise.

UFUNCTION(BlueprintCallable, Category = "PixoVR | Teleporter")

Definition at line 211 of file TeleporterBase.cpp.

Here is the caller graph for this function:

◆ SetMotionController()

void ATeleporterBase::SetMotionController ( UGripMotionControllerComponent * InMotionController)
virtualBlueprintCallable

Set the motion controller that controls this Teleport.

Parameters
InMotionControllerThe motion controller component.

UFUNCTION(BlueprintCallable, Category = "PixoVR | Teleporter")

Definition at line 276 of file TeleporterBase.cpp.

Here is the caller graph for this function:

◆ Tick()

void ATeleporterBase::Tick ( float DeltaTime)
overrideprotectedvirtual

Definition at line 80 of file TeleporterBase.cpp.

Here is the call graph for this function:

◆ TickTeleporter()

virtual void ATeleporterBase::TickTeleporter ( float DeltaTime)
privatevirtual

Tick the Teleporter.

Parameters
DeltaTimeThe delta time.

Reimplemented in ABySpotTeleporter, and APixoVRTeleporter.

Here is the caller graph for this function:

◆ UpdateArcEndpoint()

void ATeleporterBase::UpdateArcEndpoint ( const FVector & NewLocation,
bool ValidLocationFound )
protectedvirtual

Update the endpoint of the arc spline.

Parameters
NewLocationThe new location for the endpoint.
ValidLocationFoundWhether a valid teleport location is found.

Definition at line 216 of file TeleporterBase.cpp.

Here is the caller graph for this function:

◆ UpdateArcSpline()

void ATeleporterBase::UpdateArcSpline ( TArray< FVector > & SplinePoints,
bool ValidLocationFound )
protectedvirtual

Update the arc spline.

Parameters
SplinePointsThe spline points for the arc.
ValidLocationFoundWhether a valid teleport location is found.

Definition at line 90 of file TeleporterBase.cpp.

Here is the caller graph for this function:

◆ UpdateMotionControllerRotation()

void ATeleporterBase::UpdateMotionControllerRotation ( const FVector2D & Direction)
virtualBlueprintCallable

Update the motion controller rotation for pad rotation.

Parameters
DirectionThe motion controller pad axis direction.

UFUNCTION(BlueprintCallable, Category = "PixoVR | Teleporter")

Definition at line 243 of file TeleporterBase.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ ArcEndPoint

UStaticMeshComponent* ATeleporterBase::ArcEndPoint
VisibleDefaultsOnlyBlueprintReadWrite

UPROPERTY(VisibleDefaultsOnly, BlueprintReadWrite)

Definition at line 137 of file TeleporterBase.h.

◆ ArcSplineComponent

USplineComponent* ATeleporterBase::ArcSplineComponent
VisibleDefaultsOnlyBlueprintReadWrite

UPROPERTY(VisibleDefaultsOnly, BlueprintReadWrite)

Definition at line 130 of file TeleporterBase.h.

◆ ArcSplineMaterial

UMaterial* ATeleporterBase::ArcSplineMaterial
BlueprintReadWriteEditAnywhere

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PixoVR | Teleporter", Meta = (AllowPrivateAccess = "true"))

Definition at line 158 of file TeleporterBase.h.

◆ ArcSplineMesh

UStaticMesh* ATeleporterBase::ArcSplineMesh
BlueprintReadWriteEditAnywhere

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PixoVR | Teleporter", Meta = (AllowPrivateAccess = "true"))

Definition at line 151 of file TeleporterBase.h.

◆ Arrow

UStaticMeshComponent* ATeleporterBase::Arrow
VisibleDefaultsOnlyBlueprintReadWrite

UPROPERTY(VisibleDefaultsOnly, BlueprintReadWrite)

Definition at line 144 of file TeleporterBase.h.

◆ bActivateOneTeleporterAtTime

bool ATeleporterBase::bActivateOneTeleporterAtTime = false
BlueprintReadOnly

UPROPERTY(BlueprintReadOnly, Category = "PixoVR | Teleporter")

Definition at line 69 of file TeleporterBase.h.

◆ bDrawArcSpline

bool ATeleporterBase::bDrawArcSpline
EditAnywhere

UPROPERTY(EditAnywhere, Category = "PixoVR | Teleporter")

If set to 'true' it will draw the arc spline that is used to show the direction of the teleport location.

Definition at line 81 of file TeleporterBase.h.

◆ bDrawTeleportArrow

bool ATeleporterBase::bDrawTeleportArrow
EditAnywhere

UPROPERTY(EditAnywhere, Category = "PixoVR | Teleporter")

If set to 'true' it will draw the arrow that points to the direction of the controller pad location.

Definition at line 87 of file TeleporterBase.h.

◆ bIsTeleporterActive

bool ATeleporterBase::bIsTeleporterActive
BlueprintReadOnly

UPROPERTY(BlueprintReadOnly, Category = "PixoVR | Teleporter")

Holds the state if the teleporter is active or not.

Definition at line 63 of file TeleporterBase.h.

◆ bIsValidTeleportDestination

bool ATeleporterBase::bIsValidTeleportDestination
BlueprintReadOnly

UPROPERTY(BlueprintReadOnly, Category = "PixoVR | Teleporter")

Holds the state if the last teleport location is valid or not.

Definition at line 75 of file TeleporterBase.h.

◆ FadeInDuration

float ATeleporterBase::FadeInDuration
EditAnywhere

UPROPERTY(EditAnywhere, Category = "PiUpdateMotionControllerRotationxoVR | Teleporter")

Definition at line 111 of file TeleporterBase.h.

◆ FadeOutDuration

float ATeleporterBase::FadeOutDuration
EditAnywhere

UPROPERTY(EditAnywhere, Category = "PixoVR | Teleporter")

Definition at line 117 of file TeleporterBase.h.

◆ MotionController

UGripMotionControllerComponent* ATeleporterBase::MotionController
Replicated

UPROPERTY(Replicated)

Definition at line 57 of file TeleporterBase.h.

◆ PadRotation

FRotator ATeleporterBase::PadRotation
BlueprintReadOnly

UPROPERTY(BlueprintReadOnly, Category = "PixoVR | Teleporter")

Definition at line 105 of file TeleporterBase.h.

◆ SplineMeshComponents

TArray<USplineMeshComponent*> ATeleporterBase::SplineMeshComponents
private

Definition at line 239 of file TeleporterBase.h.

◆ TeleportLaunchVelocity

float ATeleporterBase::TeleportLaunchVelocity
EditAnywhere

UPROPERTY(EditAnywhere, Category = "PixoVR | Teleporter")

Set this to higher values to make the teleporter teleport more far away.

Definition at line 93 of file TeleporterBase.h.

◆ TeleportRotation

FRotator ATeleporterBase::TeleportRotation
BlueprintReadOnly

UPROPERTY(BlueprintReadOnly, Category = "PixoVR | Teleporter")

Definition at line 99 of file TeleporterBase.h.

◆ ThumbDeadZone

float ATeleporterBase::ThumbDeadZone
EditAnywhere

UPROPERTY(EditAnywhere, Category = "PixoVR | Teleporter")

This value is used to check when to create a direction arrow of the controller pad.

Definition at line 123 of file TeleporterBase.h.

◆ TimedLocation

FVector ATeleporterBase::TimedLocation
protected

Definition at line 28 of file TeleporterBase.h.

◆ TimedRotation

FRotator ATeleporterBase::TimedRotation
protected

Definition at line 29 of file TeleporterBase.h.


The documentation for this class was generated from the following files: