- Home /
Point & click, Intelligent Path
Hi I try to create a Rpg point & click game (like ragnarok).
The deplacement without obstacle work pretty well but it get complicated when i add obstacle.
So I have to create an intelligent path, when my character must dodge an obstacle but I have no idea how to do this.
For exemple here is my character, a stairway and an obstacle.
Actually when i click on the blue point, my character just walk in straight line into the void.
I hope something like this
Answer by ShadoX · Aug 11, 2013 at 05:02 PM
Try looking into path finding algorithms and how they work. If it was up to me, then I'd probably try to either add a couple of empty game objects that contain data for specific paths (for example, start/end of that stairway) which would mean lots of those in specific areas of the game or try to do it just via code, which means finding a way to determine the path. Perhaps a raycast (if I remember the term correctly) to the destination and check if there are any obstacles/floor to walk on/etc. and from there on try figuring out the path.
But that's just a wild idea. Haven't done anything like this before, so there are definetely better ways of doing this.