I'm trying to make enemies that mmove towards the player and dodge eachother so they don't stack in the same place.
What should i use to achieve this?
Simply going straight and when collision is imminent turning left/right?
Pathfinding avoiding moving objects
In the most basic sense yes. Have a look at all the examples of different collision avoidance techniques here:
http://www.red3d.com/cwr/steer/
This is a good start point.
http://www.red3d.com/cwr/steer/
This is a good start point.
"To know the road ahead, ask those coming back."
i think drawing a colored polygon under the ai's feet before drawing the world and other stuff, and checking if a certain x/y/z axis makes contact with this color could make collision appear realistic. this colored primitive could appear under the map or so far above so it is non noticeable by the human eye. its purpose in life is only for collision detection.
about the move towards the player i would suggest a FOV (Field of View) variable and whenever the player x/y/z axis enters this area, the ai's destination becomes the players current coordinate that the ai moves to.
about the move towards the player i would suggest a FOV (Field of View) variable and whenever the player x/y/z axis enters this area, the ai's destination becomes the players current coordinate that the ai moves to.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement