I'm creating a function to detect if the player is on mobile or desktop and change the type of movement.