private void GoInfrontOfObject() { bool onceVisible = false; Eyes.Instance.LookDown(); Walk walk = Walk.Instance; while (!PositionedCorrectly) { Thread.Sleep(150); Rectangle ob = processor.DetectObject(); if (ob.Width != 0) { if (Processing.CloseEnough(ob)) { PositionedCorrectly = true; } else { Call(() => walk.StartWalking(0.4F, 0F, processor.CalculateTheta(ob))); } }// no object, but we seen it before else if (onceVisible) { Logger.Log(this, "Im probably at the object, but i cant see it"); } } walk.StopMoving(); }