Search found 144 matches

by dteviot
09 Jun 2015, 21:33
Forum: General Development
Topic: Feature #2229: Improve pathfinding AI
Replies: 48
Views: 36150

Re: Feature #2229: Improve pathfinding AI

@scrawl @Zini TL;DR; I will concede Scrawl's point, calling checkPathCompleted() will reduce the "running in circles" incidents. I'll test that out this weekend and see how it works. But I suspect we still need to check for overshooting waypoints when framerate is low. Also, I'll point out...
by dteviot
09 Jun 2015, 10:12
Forum: General Development
Topic: Feature #2229: Improve pathfinding AI
Replies: 48
Views: 36150

Re: Feature #2229: Improve pathfinding AI

@Gus Here's the experimental data At the Dren plantation, (cell 2, -7). With "frinnius posuceius" given a speed of 100, who I hit to make him chase me. First two numbers are frinnius' X and Y co-ords. Second two numbers are the waypoint frinnius is trying to reach. Next two numbers are the...
by dteviot
08 Jun 2015, 00:13
Forum: General Development
Topic: Feature #2229: Improve pathfinding AI
Replies: 48
Views: 36150

Re: Feature #2229: Improve pathfinding AI

it's possible that it never goes further away if you run in perfect circle, or if the NPC runs in a spiral, so this might not work.But I like this idea and in the same spirit,you might do the check on the zAngle. If this angle change of 180 degrees, then you've past the way-point. What do you think...
by dteviot
07 Jun 2015, 21:19
Forum: General Development
Topic: Feature #2229: Improve pathfinding AI
Replies: 48
Views: 36150

Re: Feature #2229: Improve pathfinding AI

@scrawl That value seems excessively large. The change would fix one bug but create others in the process. I think the root cause of the problem you are seeing would be AiCombat calls checkPathCompleted only every 0.25 seconds (tReaction). If we check it every frame instead, wouldn't that fix the is...
by dteviot
07 Jun 2015, 21:03
Forum: General
Topic: Strange At-Rest Poses
Replies: 4
Views: 2828

Re: Strange At-Rest Poses

@DocClox The first error reported in you log is this: Can't create offscreen surface: Ran out of memory in D3D9Device::copyContentsToMemory at B:\Programming\Libraries\Ogre\Source\RenderSystems\Direct3D9\src\OgreD3D9Device.cpp (line 1406) In my experience, once you run out of memory, you're deep int...
by dteviot
07 Jun 2015, 03:15
Forum: General Development
Topic: Feature #2229: Improve pathfinding AI
Replies: 48
Views: 36150

Re: Feature #2229: Improve pathfinding AI

@mrcheko True, applies to any other package apart aiCombat. I fixed that rather long time ago (only in aicombat): PathFinder::syncStart, look for usage in AiCombat::buildNewPath Thanks for that. I've found it and updated the PR so that AiFollow will use this sync logic as well. That seems to reduce ...
by dteviot
06 Jun 2015, 02:49
Forum: General Development
Topic: Feature #2229: Improve pathfinding AI
Replies: 48
Views: 36150

Re: Feature #2229: Improve pathfinding AI

I believe the problem is the pathing can have problems when it "overshoots" a nav point. It's true, it applies to all packages (though maybe simpler to observe in aicombat). Recently radius to check pathpoint was 64.0 now it's 32.0 (PathFinder::checkPathCompleted, tolerance), checked that...
by dteviot
01 Jun 2015, 23:32
Forum: General Development
Topic: Feature #2229: Improve pathfinding AI
Replies: 48
Views: 36150

Re: Feature #2229: Improve pathfinding AI

Seems that we're talking about two different issues then. I'm sure the path-restarting is what causes circling in many cases. An easy way to reproduce: - set an NPC that is not in the player's line of sight to AiFollow on the player - keep walking back and forth The NPC will then run in circles ind...
by dteviot
01 Jun 2015, 21:38
Forum: General Development
Topic: Feature #2229: Improve pathfinding AI
Replies: 48
Views: 36150

Re: Feature #2229: Improve pathfinding AI

Unnecessary complicated, IMO. Plus, we need it fixed for all AI packages and not just combat. If this fix was deemed acceptable, I was going to add it to the other packages. AFAIK the basic issue with the circling is an actor restarting on the same path again and again whenever it's recalculated (t...
by dteviot
01 Jun 2015, 07:11
Forum: General Development
Topic: Feature #2229: Improve pathfinding AI
Replies: 48
Views: 36150

Feature #2229: Improve pathfinding AI

I've submitted a PR for fixing the "running in circles" thats seen is AiCombat. https://github.com/OpenMW/openmw/pull/602 I'm providing this post because I believe the fix requires a bit more explanation than just the PR. I believe the problem is the pathing can have problems when it "...