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?
Thanks
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?
Thanks
Comment