Best practice for a 'smart' HUD waypoint system?

So, I’ve built a HUD waypoint system using the ‘project world to screen’ node to instruct the player which direction to walk towards, in order to reach the next quest objective at hand. The location fed into the ‘project’ node comes from the world space location of the current quest objective that the player is engaged in, is then converted into 2D space and represented by an arrow widget on screen. I think it works wonderfully, except for one small thing… the waypoint is always pointing *directly *towards the objective, regardless if the player can actually navigate that way.

For example, if the next quest objective happens to be on the other side of a massive wall, the waypoint is just pointing towards the middle of that wall, which the player can’t climb. It’s not enough to know *which *direction the objective is, it needs to guide them *how *to get there, so I need the waypoint to always represent where the player should [and can] go to reach the objective. Navigating around the wall might require them to follow several different waypoints, the last of which ends at the objective. Obviously, it needs to be dynamic solution, as the optimal path would depend, entirely, on the player’s and objective’s locations.

I’ve seen this problem solved countless times in AAA games [Horizon Zero Dawn is perhaps the best example] and, before I start trying to reinvent the wheel, I’m curious what you guys would suggest as a best practice? How do the big boys do it?


Study a little bit the “A*” algorithm; it’s widely used in robotics and is also implemented into Unreal’s AI module.
After understanding how A* works you will be able to solve your problem with relative ease:

Awesome! Very cool. I will check it out. Thanks.

That’s why it doesn’t really work imo. Its better for systems that indicate / hint where you’re taking damage from.
Clarity is just as important in Indie games to avoid player frustration. Btw: What’s the genre / look of the game?
If its contemporary / futuristic, obviously you’ve got infinite options for onscreen minimaps, popup HUD widgets.
But what if its RPG/Fantasy? You could use scene-capture and display the Map + Waypoints as 3D ‘magic FX’.

Right - at the moment, it’s not giving the player the exact info they need, which is confusing and the reason I’m trying to figure out how to fix it. :wink: When I said “it works perfectly”, I probably should have said “it works perfectly, given the requirements that it was built according to, from a year ago, before the game had scaled so much and the requirements changed”.

It’s a futuristic third person shooter, but I *really *don’t want to mess with the look of the waypoint. In fact, I’ll say designing a different system isn’t an option I’m remotely considering. The current waypoint system is clean, clear and elegant… the only issue I see is that it needs to be ‘fed’ with updated world space locations to path around obstacles.


Your game, you’re the editor. You say how it should look.
But I suspect (fear), that approach will break sometimes.
Maybe not enough to matter, just depends on the terrain… :slight_smile:

I’ve done a bit of research into the A * algorithm and the idea absolutely makes sense. What I’m still not clear on is what it might look like, in implementation.

For an open world environment, should I litter the game world with ‘waypoint actors’ and put them into an array, then select the best one from that finite set of locations or try to do all the calculations using navmesh/line traces/other maths?

Hey, did you ever find a solution for this?


Hey @SCR33, did you ever find a solution for this?


Creating a class of waypoint actors then putting them into an array, for each level, will work. However I don’t know if it’s the most performant method.