Set Ped Walk to a Distance Coord
is there any way and example on how to get a self generated ped walk to a location which is more nodes away from it?
Let say that I have generated my player and a ped to two different locations:
Game.Player.Character.Position = new Vector3(-1000, -1000, 3)
playerPed = World.CreatePed(PedHash.Swat01SMY, new Vector3(1000, 1000, 3));
(Let's now dismiss the handling of Z-coo.)
They are far away from each other, thus if the ped "wants to get" to the player, it has to use a path, it can't get a straight way.
How do I get the ped to walk to me if we have this distance? If there is just a few meter distance and the ped has to walk a straight line, I get it to work, but if it has to take corners, streets, turns, etc, it does not function: the ped starts walking towards me but dismisses every object (wall, building, etc).
It seems to me that I miss the step where I get the path nodes between the ped coords and player coords. But how to get it?
Below are the functions that I've tried. Some of them work with small distance and straight way. Some of them get the Ped walking towards me, but in a straight line (, which makes the ped stop after it reaches an obstacle).
Thanks a lot for help!
I continued searching the WEB. What I found is that some other guys are having same problem and that they have no solution. Others are saying that pathfinding is not working for them as well. Thus I implemented my own pathfinding solution. Consumed 2 days of my time but works great.