teleportation to pre-established points within a vr ue space

I would need your help to check if the material I found online is correct. I am trying to implement a teleportation system to specific points in a predetermined order using the “A” key on the Oculus Quest 2 controller.

Excuse me if I will be too long.

Here are the steps I found:

Creating a list/array of teleportation points:

Within the character’s Blueprint (BP_PlayerCharacter), create a variable of type Actor Array (Actor) called TeleportPointsList.

Populate this array with references to your teleportation points (BP_TeleportPoint). This can be done in several ways, such as by manually setting the actors in the editor.

Setting an index for the array:

Create a variable of type Integer called CurrentTeleportIndex to keep track of the current index in the array.

Initializing the list of teleportation points:

At the beginning of the game (Begin Play), find all BP_TeleportPoint actors in the level and populate TeleportPointsList with these actors.

Sequential Teleportation Implementation:

When the A key is pressed, updates the current index (CurrentTeleportIndex).

Retrieves the TeleportLocation variable of the current teleport actor from the TeleportPointsList array using CurrentTeleportIndex.

Set the character’s new Actor Location using TeleportLocation.