Skip to content

Pathway v1.1.0

Choose a tag to compare

@doubleactii doubleactii released this 18 Apr 06:38
· 3 commits to main since this release

Changelog 📒

Version 1.1.0

Added

  • Introduced the nodeToTile internal API, enabling tracking of tiles within a path.

Fixed

  • Addressed an issue where setPos didn't trigger moving animations.
  • Implemented support for delta time in collision mode. This was causing issues at lower FPS due to the VYLO movePos API not handling delta time? This fix resolved #9.
  • Adjusted the order of events to ensure they are called last, allowing developers to initiate another pathfinder call within an event callback.

Refactored

  • Reorganized codebase by removing duplicated and unnecessary code segments.

Additional Info

The pathfinder module uses the default instance.moveSettings.stepSize to figure out the step size when pathfinding.
Using pOptions.minDistance is considered experimental. It is for advanced users only. Using it can cause issues in the pathfinding so only use it if you understand how it works. Feel free to peek at the code ⚡

When using pOptions.minDistance it is advised to have it match the stepSize of the instance. As this is the safest distance, but it exists if users want more control. When omitting this from the options object, the pathfinding system will automatically use the stepSize as the minDistance. This is also true when using the position mode. It will convert the pixelsPerSecond property into a stepSize and move the instance accordingly.

However ultimately, we think it's safer to omit it entirely. Since you can only pass in minDistance when calling the Pathway.to API if your stepSize changes dynamically while you are already pathfinding the minDistance will not make sense for the new stepSize and your pathfinding may not act as expected.

Full Changelog: v1.0.0...v1.1.0