How can I detect in which direction the player is moving at the js level.
It is for a camera effect that I want to achieve, I tried with .isMoving () && .getInputDirection () as a result the camera follows the player according to the condition that I apply. but I still have a problem to solve. For example I tell it to move to the left only if the player is moving and direction 4 is being pressed, it works well but if the player advances up or down while holding direction 4 the camera moves equally and this leads to errors . Any advice.
It is for a camera effect that I want to achieve, I tried with .isMoving () && .getInputDirection () as a result the camera follows the player according to the condition that I apply. but I still have a problem to solve. For example I tell it to move to the left only if the player is moving and direction 4 is being pressed, it works well but if the player advances up or down while holding direction 4 the camera moves equally and this leads to errors . Any advice.