title: Vuforia / Lean Touch and cancelling bg interference with objects
body: <p>I've been working on a project for a while and ultimately what I have is a minority report style setup with AR screens in front of me.  I'm using a unity plugin called lean touch which allows me to tap on the mobile screen and select the 3d objects.  I can then move them around and scale them which is great.</p>
  
  <p>I have an undesired side effect though, under a different situation this would be fantastic but in this case it's hurting my head.  If you trigger the target using a user defined target the screen appears in front of you with the camera (real world) behind it.  I then tap on the item and can drag on my mobile device to interact.  The problem is, if someone walks past my mobile in the background the tracking 'pushes' my item off my screen as they walk past.</p>
  
  <p>Under a different setup I could take advantage of this as I wave my hand behind the camera and can interact with the item,  unfortunately all I can do is push it from side to side not scale or anything else and it's kind of making the experience problematic.  I therefore would like help to find out how to stop the tracking of my objects position if the camera background changes.  Thus leaving my objects on screen until I touch the screen to interact.</p>
  
  <p>I'm not sure exactly what needs turning on or off, if it's a vuforia setting or a lean touch unity setting with layers etc or rigidbody or something to add.  I need directional advice on which way to go as I'm going in circles at the moment.</p>
  
  <p>Screenshot below.</p>
  
  <p><a href="https://imgur.com/a/NYekP" rel="nofollow noreferrer">http://imgur.com/a/NYekP</a></p>
  
  <p>If I wave my hand behind or someone walks past it moves the AR elements.</p>
  
  <p>Ideas would be appreciated.</p>
  
  <hr>
  
  <p>The only code that interacts with an object is the below which is on a plane used as a holder object for the interactive screen prefab so lean touch will move the plane as the screen thinks its a gui element and therefore not interactable, the last line is added to hide the original plane so the duplicate isnt visable when I lean touch drag the screen.</p>
  
  <pre><code>using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  using Vuforia;
  
  public class activateChildObjects : MonoBehaviour {
  
  public GameObject MyObjName;
  //Get the original GUI item to disable on drag of the cloned item
  public string pathToDeactivate;
  
  
      void Update(){
  
          if(DefaultTrackableEventHandler.lostFound == true){
  
          foreach (Transform child in MyObjName.transform) {
              child.gameObject.SetActive(true); 
               } 
                   Debug.Log("GOT IT");
  
  
          }else{
                  foreach (Transform child in MyObjName.transform) {
                                   child.gameObject.SetActive(false);
                  } 
  
                  Debug.Log("Lost");
  
          }
          //Remove original panel
  
  GameObject.Find("UserDefinedTarget/"+pathToDeactivate).SetActive(false);
  
      }
  
  
  
  
  
  }
  </code></pre>
  
  <hr>
  
  <p>EDIT</p>
  
  <hr>
  
  <p>Ok I haven't stopped it from happeneing but after numerous code attempts I just ticked all the tracking options to try and prevent additional tracking once found and it's not right but it's an improvement.  It will have to do for now.
  <a href="https://i.stack.imgur.com/F5COo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F5COo.png" alt="Inspector Settings"></a></p>