View Issue Details

IDProjectCategoryView StatusLast Update
0003414The Dark ModAIpublic06.06.2013 15:16
Reportergrayman Assigned Tograyman  
PrioritylowSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionTDM 1.08 
Target VersionTDM 2.00Fixed in VersionTDM 2.00 
Summary0003414: Eliminate or reduce wavering in AI walk
DescriptionWhen two AI are walking toward each other, one or both will wriggle side to side slightly, as if trying to make up their mind how they will pass the oncoming AI.

This is due to pathfinding telling them to walk toward one side of the oncoming AI's bounding box, then in a following frame telling them to walk toward the other side. As the walk target shifts from side to side, the AI wriggles from side to side.

This also happens when an AI is following another AI that's walking at a slower pace.

This is a minor nit, and can be dealt with after 2.0. Just recording it so it doesn't get forgotten.
TagsNo tags attached.

Activities

grayman

grayman

06.06.2013 15:16

viewer   ~0005533

This was caused by a floating point problem when determining the relative speed of a patrolling AI with another AI in front of it, presenting an obstacle. If the obstacle AI is moving at the same speed or faster, then it isn’t really an obstacle because it won’t be in the way. For two AI with the same travel speed, the math on the speed comparison wavered back and forth between “is an obstacle” and “isn’t an obstacle”, causing the AI to be given two different locations to walk to: the real goal beyond the obstacle, or a point alongside the obstacle, so it could be avoided. This caused wriggling as the AI pointed itself back and forth between the two goal locations.

Simplified the math, took the floating point problem into consideration, and the problem is fixed.

Rev. 5805:

AI_pathing.cpp

Issue History

Date Modified Username Field Change
14.05.2013 20:06 grayman New Issue
14.05.2013 20:06 grayman Status new => assigned
14.05.2013 20:06 grayman Assigned To => grayman
06.06.2013 15:16 grayman Note Added: 0005533
06.06.2013 15:16 grayman Status assigned => resolved
06.06.2013 15:16 grayman Resolution open => fixed
06.06.2013 15:16 grayman Fixed in Version => TDM 2.00
06.06.2013 15:16 grayman Target Version => TDM 2.00