Updating distance on setPosition