-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The calculation for how to derive a follower path is quite different now (and simpler). When both tokens are STG or both are not STG, the calculation is the same: simply apply the offset to all path points. This lets the follower's path have the exact same shape as the leader. When a non-STG token is following a STG leader, we reflect the waypoints of the leader in the follower path (offset, of course). This does not keep the full pathfinding shape when pathfinding around terrain, but at least the path is not arbitrarily chosen and does not suffer issues with zig-zagging. When a STG token is following a STG leader, we again reflect the waypoints. But in this case we have to snap each resulting point to the grid, and need to fill in partial paths between each waypoint. As before, this pathfinding is simple, i.e., it is not an A*-based algorithm.
- Loading branch information
1 parent
d748d38
commit abc9f60
Showing
3 changed files
with
89 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters