getDirection does not go outside stage bounds