0
\$\begingroup\$

I'm working on my 1st title called Infernal, and I'd like to make the enemy able to walk on both ground and walls.

For exemple: let's say the enemy is running towards the player and he gets shot. Instead of completing the chase, he jumps on the wall and starts running on it as a way throw off the player's crosshair.

Think about it as having a normal navmesh on the ground, a vertical one on the walls, and a navlink in between so the AI could alternate between both. The only problem is there is no way I know of to have a vertical navmesh in Unreal.

How can I implement this behaviour?

\$\endgroup\$
9
  • \$\begingroup\$ Simple Wall Run System on UE5 — this video may help you I guess \$\endgroup\$ Commented Jan 5 at 9:56
  • \$\begingroup\$ @riteshshinde the only problem with that is making the AI know if there is an obstacle i could do a line trace and that wouldn't have a huge performance hit for one enemy but when we add a couple more enemies we'd have a noticeable hit \$\endgroup\$ Commented Jan 8 at 20:13
  • \$\begingroup\$ Does every enemy need to line trace every frame, or can you stagger these checks? I recall a demonstration of a similar mechanic in one of the recent Doom games where AI evaluate combat positions by computing line traces for visibility to the player. They have hundreds of points to evaluate, but by turn-taking, they're able to update the whole combat space multiple times a second while maintaining performance, and this is frequent enough to keep the enemies looking aware, agile, and threatening. \$\endgroup\$ Commented Jan 11 at 0:48
  • \$\begingroup\$ I found this tutorial about generating vertices then making a mesh out of it is there a way to make the ai use that to guide the navigation. @DMGregory sorry to mention u but you seem to know a lot more than I do \$\endgroup\$ Commented Jan 11 at 18:56
  • 1
    \$\begingroup\$ @Emil I'm already trying to make the curve solution work somehow. you're really creative mate thanks for the ideas \$\endgroup\$ Commented Jul 8 at 11:33

1 Answer 1

0
\$\begingroup\$

You can't.

The Navmesh system only operates in 2D space, Top down. It is aware of Jumps required, but it cannot map wall space.

My single player wall running game involved rotating the Wall mesh and camera since the Character class code contains hard-coded references to Z being "down".

\$\endgroup\$
5
  • \$\begingroup\$ If it's not possible to implement this with the built-in navmesh system specifically, can you propose an alternative strategy to answer the question "How to make an enemy able to walk on walls in Unreal Engine"? \$\endgroup\$ Commented Jan 11 at 0:45
  • \$\begingroup\$ @DMGregory, Any other solution to the question as asked would involve writing a completely new path-finding AI module. \$\endgroup\$ Commented Jan 11 at 1:03
  • \$\begingroup\$ I think we can be a little more imaginative than that. 😉 For instance, we could propose that the level designer place markup nodes on specific walls designated for wall-running, and code our AI behaviour tree to search for such a markup node in line of sight when trying to activate its "dodge to wall" behaviour. A fully automatic/general solution would be nice, but many games have shipped with manual mark-up like this. Re: the remark of how much code this demands, StackExchange answers are generally not required to include complete code, just useful guidance about how to approach the problem. \$\endgroup\$ Commented Jan 11 at 1:10
  • \$\begingroup\$ @DMGregory, that approach was already denied by the OP in comments. \$\endgroup\$ Commented Jan 11 at 1:30
  • \$\begingroup\$ @DMGregory, My answers are down-voted either way, too much or too little. So please provide your better answer, so that I may delete this factually accurate one, before the down-votes start and compound. \$\endgroup\$ Commented Jan 11 at 1:59

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.