Adjusted the direction transform in walk guide function