I am wanting to create a GPS system similar to GTA 5.
Click an area of the map and it creates a waypoint of where you clicked and then a visual of what roads to use to get there.
I am wanting to get some ideas of how I would do it?
I’ve thought of pathfinding service but I don’t know how to make paths follow roads and not go to random places to get somewhere and I don’t really want to create custom nodes since the game I’m creating will have a lot of roads and I don’t want to create a million nodes. I have thought of making paths follow each end of a road but the way my game is it wouldn’t work out.
Has anyone got any ideas of how I should do it?
If you are willing to make it yourself and willing to send me a free model then go for it! You will get a percentage of credits depending on how much I change of it. But I am willing to try give it a go for myself!
I made a proof of concept system a while ago using A* pathfinding. It isn’t optimized at all, but I would definitely look into using A*. Just create a map of the nodes along the different roads. A* search algorithm - Wikipedia
I’m not sure the best way of how to map the directions on a gui after you get the path, but
I’m trying to use test nodes as a fake path for if I figure out how to keep path finding service to follow roads only and using a minimap system for viewports but paths only in the minimap. There’s probably a better way to do this but the best way I could think of. I’ll probably improve it in the future.
I have a question:
How did you manage to make “fake nodes” so the pathfinding will only follow the given nodes? I really need that cause I also want to make a navigation system just as you did.
Roblox Dijkstra's Algorithm - YouTube you are in luck I found a source code on the Djkstra Algorithm. Its very very veryyy usefull for navigation systems.