Custom Navigation for VR

Hello everyone,

I am creating a VR game where I use the default teleportation of motion controller pawns. Now I want to have a certain area where the player should be confined in. The Ai enemies however should not be able to move outside this area. What I have done so far is the following: I created a NavArea and Navigation Query filter to create a custom nav-mesh modifier.

For example the player should not be able to teleport behind the short wall on the right part of the screen. The custom nav modifer is the one selected (yellow).

The way I wanted to block the player teleportation was to simply add the filter in the “project to nav mesh node” of the teleportation trace inside the BP_MotionController

This approach has given me limited success since it blocks the teleport fine when pointing at the area from a distance.

But if the hand crosses over into the area of the nav modifier the projection occurs straight below the hand onto the navmesh in the area where the player should not be able to go.

The problem with this is obviously that the player can glitch into the restricted area, for example by holding his hand out and spamming teleport.

Does anybody know any good approaches where this problem is tackled or if there is a fix to my solution? Any help would be appreciated.

On a side note, the images are taken on my desktop computer since I don’t have a VR set readily available at my home, that’s why the hand is in such a strange position.

Hmm I suppose a complete teleport block is a possible solution. Since the block is not just supposed to be from walls tho the ray trace won’t work I think. Thanks for the answer!

Just make a custom channel for the ray trace and make every blocking volume block that channel.

There are several ways you can do this. Either disable the teleport functionality when the hand passes through geometry that is supposed to block the teleport or do a ray trace from the pawn to the controller to see if there is a wall between them. If there is not a wall in between, shoot the teleport arc. If there is, dont shoot one.

HTH