Thread safety problem inside the MotionControllerPawn class of the VR blueprint template causes unexpected teleportation results

There seem to be a thread-safety problem inside the graph editor of the MotionControllerPawn class inside the VR blueprint template of Epic Games.
By some means, the teleportation location value is sometimes altered before and after the first camera fade’s delay, causing the player to teleport generally under the ground.
I stocked the value of the teleportation location in a variable before the fade and used it again after the fade to keep the desired location unaltered, and it seems to work perfectly now.

This isn’t a thread safety problem, it’s a problem caused by using a pure function to retrieve the variables for the teleport destination, as the pure function is not actually called until the variables are accessed which occurs after the fade delay.

The ExecuteTeleportation event for the MotionControllerPawn in the Virtual Reality Template Blueprint Project checks that there is a valid teleport destination but does not actually retrieve the Teleport Destination Location and Rotation from BP_MotionController until after the delay FadeOutDuration.

If the user moves the teleporter to an invalid location during this FadeOutDuration they will end up getting teleported to 0,0,0 when the call to the pure function GetTeleportDestination is finally called after fading out.

I was able to fix this problem by creating variables for the destination location and rotation and retrieving these values immediately after the IsValidTeleportDestination check succeeds.

You could also make GetTeleportDestination a non-pure function and call it/retrieve the variables before the delay in which case local variables would not be required.