Search Unity

Question How to make lean touch drag my objects once at a time and not all together?

Discussion in 'AR' started by Noor23, May 31, 2022.

  1. Noor23

    Noor23

    Joined:
    Feb 19, 2022
    Posts:
    28
    Hello , so I am currently working on a project where I spawn multiple items in the real world , I have imported lean touch to make these items move when I tap on them but the problem is that if I have more than one item spawned and I drag one the other also moves along with it ,, I have read and followed the documentation of leanTouch to stop this but didn't work ,, now I have lean touch game object on my hierarchy and I assigned lean drag translate for each prefab I want to drag , also each prefab has a box collider ,, I even tried to add some movement script and attached it to my prefabs that didn't work either , so if anyone can help me by making only the item my finger is touching to be dragged at a time and not all at once, would be appreciated.
    Thanks in advance!
     
  2. unity_1A8C24A0E9A2FCC2A46C

    unity_1A8C24A0E9A2FCC2A46C

    Joined:
    Jan 28, 2022
    Posts:
    14
    1) You can solve your problem just looking at example provided by Lean Touch plugin in next path in your project Plugins/CW/LeanTouch/Examples/22 PressToSelect
    2) You can solve your problem following next steps
    A) adding "Lean Finger Down" and "Lean Select By Finger" scripts in empty object in scene
    B) adding "Lean Selectable By Finger" to the all objects that you want to drag separately
     
    Fao2212 and Noor23 like this.
  3. unity_1A8C24A0E9A2FCC2A46C

    unity_1A8C24A0E9A2FCC2A46C

    Joined:
    Jan 28, 2022
    Posts:
    14
    upload_2022-8-4_18-16-25.png
     
  4. shakila_sahira

    shakila_sahira

    Joined:
    Nov 29, 2022
    Posts:
    1
    Hi, How to make lean touch drag my objects once at a all together?
    Please help me..
     
  5. hars_tonoo

    hars_tonoo

    Joined:
    Jan 21, 2021
    Posts:
    1
    Hello, you need to drag your object prefab in the Select field
    Where it says "None (Lean Selectable)"
     
  6. abirGh

    abirGh

    Joined:
    Dec 6, 2023
    Posts:
    1
    What do u mean by "in empty object in scene" please ?