Hello,
I’ve searched thru google for ways to deal with my problem but sadly i couldn’t find any viable, at least in my opinion) answers.
My plan is creating a RTS with a slightly dynamic and vast enviroment. I did created a big plane to use it as a test with dimensions 10000x10000(don’t know if it is too big for an rts map), with an grid graph 150x150 and a node size of about 700, and in the game there are some obstacles which are somewhat small and the navigational mesh recognizes them but creates too big of a hole in the navigation map. Now of course this can be fixed with setting the grid graph a bigger size and smaller radius of the nodes but i think it will be somewhat detrimental for the overall performance of the game, especially if there are like 100 units on the map. One of the answers i found on this forum was to use raycasts in the IsValidConnection but i am not really sure that would fix it.
So my main question is there a way for the small obstacles to leave a smaller hole in the navigational map(mesh)?
Maybe this could be easily fixed with automatically creating navmesh but sadly i am not able to afford the pro version right now.
Any tips?
Well, I can tell you right now that with the way the GridGraph works, the smallest chunk of area which can be flagged obstructed is whatever your node size is… that’s just the way it works… it divides the whole terrain into a grid and when you add an obstruction, it updates the grid nodes that contain that obstruction to be not walkable.
Thank you for your response!
Yeah judging by the name I kinda though it might be impossible, i was just thinking that maybe there is some way, or someone could share his experience how he handled this or maybe there is some other graph better suited for this.
The only way to deal with worlds that large is to use navmeshes (in particular recast graphs since I don’t think anyone would want to model that by hand). Grids use too much memory. You can use the procedural grid mover (see the “Procedural” example scene), but then you can only have characters in a small part of it at a time.
I know of users that have successfully used it in worlds that are several square kilometers large (7x7 km is the largest I have heard about I think). You should try to avoid going above coordinate values of around 16000 because then floats start to loose a lot of precision.