3D Floating Enemy Pathfinding
I am trying to create an enemy that floats in the sky and functions in the following ways:
Starts in a 'searching' state where they either sit still, rotate, or follow a predetermined patrol until they see player.
Once enemy sees the player, it beelines straight for them based on
the position they saw them atIf an obstacle is in the way, the enemy will instead navigate around it to get to the target position
If it arrives at the position and can't find the player, it will
briefly search the area (rotate in a circle, or patrol a little)If it gives up it will return to original position and do its normal
routine, and on its way back it will again avoid obstacles
I have been able to accomplish all of the above programmatically with the exception of avoiding obstacles which I'm sure will make things far more complicated, instead it will just go through them directly to its target. I've tried looking into NavMesh for this but that seemed like it was primarily designed for non-flying enemies, or at least enemies that would mostly stay on one plane (height wise). The thing that makes this particularly tricky is there are buildings the player can run into, and I'd like the AI to be able to fly into them as well.
Does anyone have any recommendations for tools to check out, or ways to handle this?
Your answer
Follow this Question
Related Questions
Enemy can't move follow the path, A* algorithm for my game 0 Answers
3D First Person Game, 2D Enemy Face Player/Camera 1 Answer
Enemy pathfinding script for a 2D top down shooter game 0 Answers
how to make a running player fly through the air at a particular distance from the ground 0 Answers
My player spins when I enter play mode. What am I missing? 0 Answers