tipforeveryone
Bronze Supporter
|
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.
|
|
04-15-2023 08:36 PM |
|
tipforeveryone
Bronze Supporter
|
RE: Seem to be a path finding glitch
|
|
11-23-2023 08:30 PM |
|
tipforeveryone
Bronze Supporter
|
RE: Seem to be a path finding glitch
|
|
11-23-2023 11:09 PM |
|
Pixel Perfect
Member
|
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 |
|
tipforeveryone
Bronze Supporter
|
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
|
|
11-25-2023 11:36 AM |
|
Esenthel
Administrator
|
RE: Seem to be a path finding glitch
|
|
11-28-2023 04:15 AM |
|