tipforeveryone Posted March 10, 2017 Share Posted March 10, 2017 I use Entity:GotoPoint() on my AI character. It moves perfectly from point A to point B If my player controller stands between A and B, this AI character will push it. If I set my character mass greater than AI's , AI character will be stuck a bit and take time to "slowly" move around my cylinder physic shape. How can I make my AI move around my player character properly when using GotoPoint ? I need him to avoid my player character's position. I am sure that I can't use world:BuildNavMesh() every frame for this kind of pathfinding... Quote Link to comment Share on other sites More sharing options...
Genebris Posted March 10, 2017 Share Posted March 10, 2017 You can try getting vector between AI and player and then add a bit of force to the normal. I think a small force will help him get around your collider quicker. Quote Link to comment Share on other sites More sharing options...
Rick Posted March 10, 2017 Share Posted March 10, 2017 I thought we had avoidance with pathfinding before? 1 Quote Link to comment Share on other sites More sharing options...
tipforeveryone Posted March 10, 2017 Author Share Posted March 10, 2017 I thought we had avoidance with pathfinding before? I don't know I did not see any post before, can you show me please? You can try getting vector between AI and player and then add a bit of force to the normal. I think a small force will help him get around your collider quicker. Good idea, but I want this AI avoid me completely like this Quote Link to comment Share on other sites More sharing options...
gamecreator Posted March 10, 2017 Share Posted March 10, 2017 I posted a status update asking about dynamic navmeshes to get Josh's attention. Check out the development videos there which would solve problems like this if implemented. Edit: videos: Quote Link to comment Share on other sites More sharing options...
Genebris Posted March 10, 2017 Share Posted March 10, 2017 Josh mentions a delay in this video, it doesn't look like nav mesh could be changed every frame for every character. Quote Link to comment Share on other sites More sharing options...
gamecreator Posted March 10, 2017 Share Posted March 10, 2017 Yeah, while that video seemed responsive enough, I suspect the issue may be that on large terrains, having dozens of vehicles/characters alter the navmesh at once would drop the framerate significantly. I wonder how GTA and other games/engines work around this. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted March 10, 2017 Share Posted March 10, 2017 The navmesh updating in those video is using small levels. For a Leadwerks terrain this is probably to heavy. However you can do patch updating which is possible in the C++ version. I will try to find an example from 2 years ago. Ironically this exact same discussion was held 2.5 years ago: http://www.leadwerks.com/werkspace/topic/10911-pathfinding/page__st__20#entry79870 1 Quote Link to comment Share on other sites More sharing options...
gamecreator Posted March 10, 2017 Share Posted March 10, 2017 Yeah, and here Josh said there's a way to discard navmesh triangles but he never clarified how. I would be really happy with simply being able to toggle them active/inactive by code (after picking them or something). It would make doors/gates/bridges/carts/cars etc. viable in a game. 1 Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted March 10, 2017 Share Posted March 10, 2017 Can't find my old files on this unforntunately. Searching in the recast navigation API is the only remaining option for now. 1 Quote Link to comment Share on other sites More sharing options...
gamecreator Posted March 10, 2017 Share Posted March 10, 2017 Thanks for looking Jorn. 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.