When fly mode is active and a user begins to travel, a velocity is (potentially) set on the y-axis. When fly mode is de-activated, the velocity calculation ignores the y-axis, causing the velocity to carry over from when the user was in fly mode.
To reproduce:
with fly mode active, move up/down
disable fly mode (via setAttribute or otherwise)
move forwards
Expected Results:
the user y-position does not change while moving forwards once fly mode has been de-activated
Actual Results:
the user's y-position continues along the same line as when fly mode was de-activated, giving a flying effect when fly mode has been disabled
This change explicitly sets y-axis velocity to 0 when not flying, fixing the issue. Fixes #305.
When fly mode is active and a user begins to travel, a velocity is (potentially) set on the y-axis. When fly mode is de-activated, the velocity calculation ignores the y-axis, causing the velocity to carry over from when the user was in fly mode.
To reproduce:
Expected Results:
Actual Results:
This change explicitly sets y-axis velocity to 0 when not flying, fixing the issue. Fixes #305.