grandseiken/foundryvtt-multilevel-tokens

Player controlled tokens moving through a teleport area have problems with cursor movement in next scene

Opened this issue · 3 comments

When a player controlled token moves into a square with a teleport area set up, the token correctly teleports, but movement via cursor keys is affected in the next scene (i.e. pressing 'left' might move the token 'up-left' instead).

This may happen in other circumstances, but the the one currently affecting the scene is one with two teleport areas stacked in the same square (one 'IN' and one 'OUT', so only one should be activated) and then in the destination scene the corresponding two teleport areas are stacked in the destination square (one 'IN' and one 'OUT). Functionally this works perfectly as the DM (i.e. Token teleports to other scene when entering the square, and arrives in the other scene on the teleport square but can freely move off it) and does not have any problems with cursor movement. However, despite this also functionally working perfectly as a player logged in via-browser it does seems to exhibit this odd cursor movement side-effect issue after the first teleport.

Has been tested on player browser Chrome and Brave.

This can sometimes happen if the teleport regions are oddly aligned and/or you don't have the "snap to grid" teleport option enabled (the token then doesn't end up exactly in a grid square and this can confuse foundry). Are you sure that's not the problem?

I've encountered the same issue and I spent a while with a player trying to replicate the exact conditions that caused it. Here are our findings:

  • When a token is moved into a teleport region in a direction that faces directly into a wall in the target region their movement will treat various directions as diagonals after
  • If the player tries to move the token into a wall in the same direction they travelled into the transition it fixes their movement (I.E. walking up some stairs to the left takes you to a corner which is the transition, you have to try to continue walking left into the wall to fix the movement)
  • Moving the transition away from the wall prevents the bug happening
  • Entering the transition in a direction that does not face into the wall prevents the bug from happening
  • Snap to grid made no difference to the bug
  • Up, Down, and Left were all tested and found to have the same bug (Right was not tested because we hadn't actually thought to try all different directions we just happened to have covered those 3)

I just resolved it by moving the transition one step further down the stairs so that players aren't walking into the wall, hopefully others can do the same and this information might help identify what's going on.

Also experiencing this bug.

  • Bug is present regardless of teleportation regions' proximity to any walls. Happens even if there no walls in the scene
  • Snap to grid is on
  • Only happens if token attempts to move orthogonal to the direction used to enter region after teleportation. e.g. if entered using left/right, then bug happens after teleportation if first movement attempted after teleportation is up/down

This seriously affects the usability of this module as it completely disorients my players after teleportation.

Tested on Firefox.