Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am developing a game in Unity3D. I want an enemy character to follow the player around. The problem is, my surface is uneven and full of mountains. I am using aarongranberg's pathfinding project. Every time that a player climbs a hill or a mountain, the enemy stops because the grid is flat and it considers the mountain to be an obstacle. How do I solve this problem ?

share|improve this question
Don't make mountains an obstacle, just give them a higher cost than flat land... –  BlueRaja - Danny Pflughoeft Aug 29 at 17:41
How do i do that ? –  user3889649 Aug 29 at 17:53
Read the instructions on how to use your pathfinding library? Setting path-costs is a basic prerequisite for using A* on a graph. –  BlueRaja - Danny Pflughoeft Aug 29 at 18:01
Thanks a lot. Should have done that . –  user3889649 Aug 29 at 18:04
Maybe post an answer of how you solved your specific problem afterwards and accept it. –  Larethian Aug 29 at 21:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.