YouGroove Posted February 13, 2015 Share Posted February 13, 2015 Hi, Using GotoPoint(), i have a mob that makes big circles sometimes when the player is on the opposite side of some obstacle. Does anyone have experienced that ? Is there a way to have a shorter path ? I know MonsterAI.lua checks if the player is visible directly and just no more uses navigation, but a simple forward move, but it is not possible to have a shorter navigation path ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
gamecreator Posted February 13, 2015 Share Posted February 13, 2015 I had that problem but I thought it was fixed. http://www.leadwerks.com/werkspace/topic/10911-pathfinding/ Are you able to look at the nav mesh to see if it looks weird like mine did? Quote Link to comment Share on other sites More sharing options...
Naughty Alien Posted February 13, 2015 Share Posted February 13, 2015 ..i never liked recast..very inefficient if map is dynamic and sometimes does produce results you are not expecting to see..what i have implemented is 3D weighted grid..fast efficient and it doesnt care much what sort of geometry you throw at it.. Quote Link to comment Share on other sites More sharing options...
YouGroove Posted February 13, 2015 Author Share Posted February 13, 2015 what i have implemented is 3D weighted grid..fast efficient and it doesnt care much what sort of geometry you throw at it.. We could implement that in LE3, launch a special game mode that would raycast from top to down on the level and store hit point height in some big array. The complex thing is to calculate the shortest path from a position to another. Are you able to look at the nav mesh to see if it looks weird like mine did? Navmesh generated is clean : If we could adjust navmesh generation to generate smaller cube regions navmesh would get more precise ? I placed more objects on the map to generate a new navmesh with less open areas, it helps ot have shorter paths as navmesh will take closer vertex on the map to reach the player. The solution is combining : - adding obstacles on the map to not have too much open areas - using simple forward movement when the player is visible on the line of sight The best would be an option to tell the navemesh to generate smaller square patches. Another test, and navigation was really going in circles, that's strange as there is navmesh vertex really closer to the player. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Naughty Alien Posted February 13, 2015 Share Posted February 13, 2015 We could implement that in LE3, launch a special game mode that would raycast from top to down on the level and store hit point height in some big array. The complex thing is to calculate the shortest path from a position to another. ..that will not work well if you have tunnels or any form of layered geometry..creating instead, 3D volume grid in to which whole level will be 'sunk' and then simply dicard 'occupied cells' is way I did and its very fast and work over everything..size of search grid cell you could set simply by setting its parameter during creation..works easy, fast and over any kind of geometry.. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.