little bugfix for the 3d game

instead of tp many Math.abs if direction<0 direction=3