Teleporting to a moving platform (solved)

Hey Everyone,

Trying to figure out how to let my VR character teleport around a spaceship while it’s moving… there’s a few posts in the forum about this now but no solutions :confused:

I did find this youtube video: Unreal Engine: Moving Platforms With Navigation in VR - YouTube

And he does try and explain it in a comment, but I can’t figure out how to do what he’s saying:

In VRPawn blueprint:

  • Add the collision type of your moving mesh (such as WorldDynamic, or I created a new one called DynamicPlatform) to the existing array of acceptable types for the navigation raycast
  • In the IsTeleportValid function, add a switch based on the HitResult collision type. If it’s WorldStatic, continue on to the existing logic so it works as normal, which finds the closest point on the Navmesh. If it’s your moving mesh’s collision type (again WorldDynamic, or create your own), create new logic which returns the hit point on the mesh itself. You can get fancy here and add extra logic to make sure you’re not selecting a point on the side or bottom of the platform.
  • Add a box collision parented to the VRPawn camera for the next step…

In your moving platform blueprint:

  • Add a box collision over the platform.
  • OnBeginOverlap with the VRPawn’s box collision you added in the last step, use AttatchToActor to attach the VRPawn to the moving platform, maintaining world position, so that the player moves with the platform when he’s on it.
  • OnEndOverlap, detach the VRPawn from the moving platform, again maintaining world position.

To start with, where do I edit the “existing array of acceptable types for the navigation raycast”?

Sweet, took a break, came back, found it straight away :slight_smile:

And in case it helps anyone else, here’s the next bit:


(I’m using the Vehicle ECollisionChannel cos my moving platform is a spaceship)

Hey! That was my video. Lol I’m so sorry I never took the time to post a tutorial about it. I’m not totally confident that I wouldn’t be giving bad/incorrect advice. But your blueprint screenshots look like you did it the same way I did!

1 Like

@mjiggidy @ioFlow_Studios i have been developing similar setup too, but having an issue setting up the moving platform blueprint, could you guys please share a screenshot of that too showing beginOverlap and endoverlap event connection, thanks