Download

Placing a movement marker for dash-style movement in VR?

I’m trying to implement a dash-style movement system for my VR project. I already have a rough system in place where I launch a teleport projectile that the player automatically dashes toward. However, with that system, I have to contend with flight time of the projectile, as well as the trajectory flattening out the faster the projectile moves. Also, with an arcing projectile, its possible to launch the marker behind an obstacle the player cannot actually reach. Finally, with no way to detect sheer drops, it’s possible to run right off a level with the dash system I currently have implemented. To get around these problems, I want to implement a different method for marking the destination, but I’m not sure what the best approach is.

What I’m aiming for is a system where I can aim at an angle to instantly “lob” a marker into the environment, kind of like a slow-moving projectile but with no travel time. Since it would be possible to launch the marker into unreachable areas, I would then trace a path between the player and the teleport marker to check for obstacles. If an obstacle or drop-off is detected, the marker is placed at point of the collision or drop-off. Ideally, this would ensure the teleport marker only appears in places the player can move to in a straight line. Ideally, the trace would be done with a sweep of some sort to ensure that the area between the player and the destination is clear to accommodate the player’s movement, so that I don’t have an issue where the teleport marker can be shot through a gap too narrow for the player to fit through. At first it sounds like the sweep functionality mentioned in [Moving Physical Objects - Unreal Engine](this Unreal Engine blog post) would work, but I need the path detection to conform to terrain irregularities, and I’m concerned that terrain features like slopes or stairs would cause undesired collision detection. I’ve also considered some sort of check involving NavMesh, but I need the movement to be in straight lines only, without pathing around obstacles.

As far as a game example of what I’m looking for, I kind of want it to act like in Raw Data, except that I want the system to prevent dashing through obstacles or across open gaps, neither of which Raw Data’s system checks for. Does anyone have suggestions on how to check for a clear path for straight-line character movement?