RPTools / maptool

Virtual Tabletop for playing roleplaying games with remote players or face to face.
http://rptools.net
GNU Affero General Public License v3.0
800 stars 262 forks source link

[Bug]: Follower paths don't make sense #4813

Closed kwvanderlinde closed 5 months ago

kwvanderlinde commented 5 months ago

Describe the Bug

When a snap-to-grid token is following a non-snap-to-grid token, or vice versa, the path of the follower does not reflect the path of the leader.

To Reproduce

  1. Create a new map with a square grid.
  2. Drag two tokens onto the map. Make one snap-to-grid, the other not.
  3. Select both tokens.
  4. Drag and release the snap-to-grid token somewhere, setting waypoints on the way.
  5. Right click either token and enable Show Path. Notice the follower token has a very direct path even if the leader does not.
  6. Now drag the the non-snap-to-grid token, setting waypoints.
  7. Right click either token and enable Show Path. Notce the follower path higher than the leader.

Expected Behaviour

The leader and follower should be given paths with roughly the same shape. When a waypoint is set for the leader, the follower should be given an equivalent waypoint with roughly the same offset to the previous one, and the path should interpolate between them.

Screenshots

When STG is the leader: image

A similar path when STG is the follower: image

The latter case has at some point gotten worse since 1.13.2. Now the leader's path is also pushed up! image

MapTool Info

1.13.2, develop

Desktop

Linux Mint 21.3

Additional Context

kwvanderlinde commented 5 months ago

Non-snap-to-grid followers get extra weird when the grid size isn't a multiple of 100. E.g., if set to 70: image