修正 gY[] To direction, now To lastDirection