Cat animation function changed to make movement smoother.