Add avatar movement code.