Download

How to make AI a bit dumber?

My situation probably isn’t that unique. I need the AI to charge towards the player and if the character dodges out of the way, they should keep running for a certain distance afterwards with the potential to fall off an edge.

The problem: The nav mesh bounds volume won’t go past the edge of a surface so by default there’s no way the AI will run off an edge.

What’s the best (simplest) way to handle this? Is there a way to make the nav mesh apply to a surface that the AI can’t actually stand on? There will be random holes throughout the level that the AI and player can fall through but the AI should only fall through if it just missed charging the player.

You can use collision groups for this. Whenever an AI agent is supposed to fall, in runtime you can change his physics layer to one that pass through the hole mesh and it falls. The hole object could be a volume body, take a look at the physics and collision docs.

My guess would be make a blueprint for the character (AI) to have a chance of ignoring the collision for x mesh if x routine has been completed, im no programmer but thats what I’d try first xD

Just have a variable “isCharging”, and when you want to charge just set the target location to the player, and don’t change it until he’s done “charging”. Basically don’t look at the player’s location for a certain amount of time. To handle falling/jumping off ledges try a nav link proxy. I’ve never had any luck with it, but it’s kinda what you want to do. :slight_smile: