private void InteractWith(IInteractive obj) { if (obj == null) { return; } GameObject go = obj.GetGameObject(); if (this.characterMovementController.DistanceTo(go.transform.position) > 3.0f) { this.characterMovementController.WalkTo(go.transform.position); // walk to that point } else { obj.Interact(this.gameObject); } }