Stop animation if object isn't visible