I want to keep my AI from running into objects, and importantly I want them to not go off the floor mesh. The floor mesh is basically the ground where the AI can travel around.
My steps:
Once finished moving, do a idle until a new target point is chosen. To choose a new target point, the AI will select a random target within a radius. Once the new target point is chosen then the AI will check for a few things, is the path clear of objects? if it is, then let's get the needed y position of the floor and start the AI turn toward target point, and then move towards it.
Two line picks are done... one horizontal and one vertical.
What do you think? is my system over complicated? is there an easier and faster way to do it?
Here's a screeny to visualize it.

Note: I'm not using Blitz Terrains.
My steps:
Once finished moving, do a idle until a new target point is chosen. To choose a new target point, the AI will select a random target within a radius. Once the new target point is chosen then the AI will check for a few things, is the path clear of objects? if it is, then let's get the needed y position of the floor and start the AI turn toward target point, and then move towards it.
Two line picks are done... one horizontal and one vertical.
What do you think? is my system over complicated? is there an easier and faster way to do it?
Here's a screeny to visualize it.

Note: I'm not using Blitz Terrains.