Search Unity

XR Interaction Toolkit - End current interaction

Discussion in 'AR' started by mltlsk, Apr 9, 2020.

  1. mltlsk

    mltlsk

    Joined:
    Nov 14, 2015
    Posts:
    13
    Hi Guys.

    Short Version: I want to end the current AR-Translation in Script

    I am still very new to the AR Toolkit. hopefully someone can help me.

    What i want to do is very simple. On collision with another object, the current translating object should be attached as a child to the colliding (already have this part) and (this is my problem:) i want to stop the translation.
    Tried this.GetComponent<ARTranslationInteractable>().enabled = false; but this sets it to non-translatable permanently. i just want to end the current translation so that it stays at the collision.


    ty :)
     
    Last edited: Apr 9, 2020
  2. mltlsk

    mltlsk

    Joined:
    Nov 14, 2015
    Posts:
    13
    i fear it is impossible right now.

    this.GetComponent<ARTranslationInteractable>().enabled = false;
    afther that i add this as child to another object, set the position and start a coroutine where i reactivate the ARTranslationInteractable after 1 sec.


    Problem is that the object jumps to the position where my finger left the display even after this time.