About Store Forum Documentation Contact



Post Reply 
Seem to be a path finding glitch
Author Message
tipforeveryone Offline
Bronze Supporter

Post: #1
Seem to be a path finding glitch
Take a look on this video https://streamable.com/lod7o4

I expected that character should choose the shortest path to move between 2 destinations for both move away and return situation.

In the video, character did not choose the shortest path when doing actionMove() to move to farther destination, but choose right when return. My game is a tactical shooter, so that character movement path is vital. I really don't want any unexpected move path like this.

Anyone can explain this and is there any trick/fix.
(This post was last modified: 04-15-2023 08:37 PM by tipforeveryone.)
04-15-2023 08:36 PM
Find all posts by this user Quote this message in a reply
tipforeveryone Offline
Bronze Supporter

Post: #2
RE: Seem to be a path finding glitch
This problem can not be solved and become more and more serious bug. This makes may game look stupid for NPC movement too

https://streamable.com/p71dsi

The movevement takes longer route instead of shortest route and how the hell character turn around like that at a path node ?

This is the navigation mesh, nothing abnormal right ?

https://i.gyazo.com/95e81a6846f5cd3e2a0b...f0dbf4.png

Please fix this or at least give explaination smile for both of this reply and the original post problem too

Edit: This video even looks far more frustrating https://streamable.com/ku1o23
Why go around ? Damn this makes me so upset and want to slam my keyboard to my LCD

Edit:... I wonder if this happens to World of Esenthel too ?
https://i.gyazo.com/e10820875603e4440ecc...fda71f.png
https://i.gyazo.com/76d56f3495f09ff2b977...f20418.png
https://i.gyazo.com/90479d76755a4b9bd42e...30096c.png
(This post was last modified: 11-23-2023 09:41 PM by tipforeveryone.)
11-23-2023 08:30 PM
Find all posts by this user Quote this message in a reply
tipforeveryone Offline
Bronze Supporter

Post: #3
RE: Seem to be a path finding glitch
I found this thread https://www.esenthel.com/forum/showthread.php?tid=4470

It seems because of PathMesh between areas, I move my objects into middle of an area and things work fine, character movement path is same as expectation. I try to reproduce the same situation with Path finding tutorial map and get the same problem

https://i.gyazo.com/f046be2c92f3cefab3ca...fe3a9d.png

Here is how I put the objects in map, between 2 areas

https://i.gyazo.com/56c2759af6ddb3eca773...cdfef4.png

good side is this helps me feel better but still have no idea on how to fix the problem if my character movement is between 2 areas? This will always persist ?

Edit: btw my maxClimb is not zero
(This post was last modified: 11-23-2023 11:15 PM by tipforeveryone.)
11-23-2023 11:09 PM
Find all posts by this user Quote this message in a reply
Pixel Perfect Offline
Member

Post: #4
RE: Seem to be a path finding glitch
I'm sure Greg will want to comment on this but straight off the top of my head the only workaround I could see is to perhaps do a simple raycast, or a series of them at differing heights, from current pos (A) to destination pos (B) and if they do not hit any geometry then move directly from A to B without using pathfinding. This might fix the more glaringly obvious ones where there is a simple straight line solution.

One other approach, if this is not fixable, might be to simply use your level design to minimise the crossover points. If still getting odd path choices then restrict it to waypoint movement in these areas to simply get your NPCs from one area to another where path finding could resume.

One would hope you could always rely on pathfinding, but in these specific cases you illustrate of crossing area borders it would appear it's not always the case.

Your game is looking great btw!
(This post was last modified: 11-25-2023 10:48 AM by Pixel Perfect.)
11-25-2023 12:40 AM
Find all posts by this user Quote this message in a reply
tipforeveryone Offline
Bronze Supporter

Post: #5
RE: Seem to be a path finding glitch
I got your idea of fixing this. I will try all approach.
Thanks for your reply and comment about my game wink
11-25-2023 11:36 AM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #6
RE: Seem to be a path finding glitch
Pathfinding is calculated by the library https://github.com/recastnavigation/recastnavigation
So you could ask for some ideas there.
11-28-2023 04:15 AM
Find all posts by this user Quote this message in a reply
Post Reply