//moving forwards Mathf.Abs(localVelocity.z) > 0.01f //moving backwards Mathf.Abs(localVelocity.z) < 0.01f