Search Unity

Official XR Interaction Toolkit Preview Release (0.9)

Discussion in 'XR Interaction Toolkit and Input' started by mfuad, Dec 17, 2019.

Thread Status:
Not open for further replies.
  1. Cdngater

    Cdngater

    Joined:
    May 29, 2014
    Posts:
    65
  2. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    202
    can you lob a bug in for that? cheers!
     
  3. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    202
    also a bug for this would be great :)
     
  4. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    202
    correct, no need to worry either, the toolkit is still being actively worked on!
     
    Thimo_ and ImpossibleRobert like this.
  5. yulaw2k

    yulaw2k

    Joined:
    Apr 25, 2014
    Posts:
    31
    Anybody else having problems with calling OnSelectEnter or ForceSelect from the XRInteractionManager unless the controller Action Type is set to "State Change".
    When I call it the item just falls to the ground.
     
  6. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    202
    yeah force select doesnt set the input data for continuing frames. only triggers an OnSelectEnter. so you immediately get an OnSelectExit as the input state is not "down" per se. Something we're aware of.
     
    mikeNspired likes this.
  7. mikeNspired

    mikeNspired

    Joined:
    Jan 13, 2016
    Posts:
    82
    Anybody have a work around for this?
     
  8. blackfox_studio

    blackfox_studio

    Joined:
    Apr 8, 2019
    Posts:
    40
    Does anybody know when the new version of the XR plugin is coming out?
     
  9. ScottPeal

    ScottPeal

    Joined:
    Jan 14, 2013
    Posts:
    61
    Last edited: Jul 21, 2020
  10. mikeNspired

    mikeNspired

    Joined:
    Jan 13, 2016
    Posts:
    82
    @Matt_D_work Are you guys going to have a solution for disabling colliders and/or gameobjects and removing them from the interactor's HoverTargets?
    Right now before I disable to object or collider and then move it to 9999 * Vector.one, wait 2 FixedUpdates (One doesn't seem to call OnTriggerExit()). then I disable the object and return it to its starting position.
     
  11. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,092
    Case 1264748 for the Reticle Flickering
    Case 1264777 for the Reticle lagging behind and a jittery line renderer

    I'm not sure whether I should make a bug report of the stopLineAtFirstRaycastHit because it's there but not implemented in the processing code and probably on the list as "To Do"?

    It would be nice if we were able to re-create the Oculus laser pointer interaction. But due to the fact how the Line Renderer works this is not possible. The visual line of the oculus controller is losing alpha over distance and then a very clear dot at the end. Unity's line renderer only samples the gradient per line point. But since the XRInteractorLineVisual only uses 2 points for Straight Lines, you cannot replicate the same visual Oculus has. It would be nice if it were configurable for a Straight Line. Alternative would be applying a texture it seems.

    The XR UI Interaction seems far from done. We'd love to use it but with the current quality & missing features we just cannot. I cannot help but feel like development feels so slow of this package. The last package update was 7th of April, will there be a new version coming out soon or will this take months?
     
    Last edited: Jul 22, 2020
  12. lucas_unity653

    lucas_unity653

    Joined:
    Feb 10, 2020
    Posts:
    3
    Hi! I've just switched from Oculus Integration to Unity XR Interaction Toolkit, as I really like the fact that's platform agnostic and that's much more integrated into Unity itself (Velocity tracking + joints is great).

    But I'm finding a problem for my current project, as I am using Chronos (time control asset) for manipulating time in some part of the game. And for that, instead of accesing Rigidbodies to apply forces, I let Chronos (through Timeline component) to apply the forces. So for example if I want to apply a force I do:
    GetComponent<Timeline>().rigidbody.addforce
    instead of
    GetComponent<rigidbody>().addforce

    So, I am having an issue with XRGrabInteractable.cs, because I can't override the methods (they are private) where the forces are being applied to the object.

    Has someone had to deal with something like this?
    Is it possible that in future release those methods can be exposed?
    I think it would be great if we could grab XRGrabInteractable.cs as a base and override methods by our project needs.

    Thanks for the amazing work in the toolkit.
     
  13. mtalbott

    mtalbott

    Joined:
    Dec 21, 2011
    Posts:
    125
    @Matt_D_work 0.9.4 was released April 7th, over 100 days ago. will we be getting an update soon? and will it still be preview or are you close to a production version?
     
    harleydk and Shizola like this.
  14. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    I am hoping for a new version of this which is compatible with the Unity Input System Package as that is already a verified package in 2020.1
     
  15. beatdesign

    beatdesign

    Joined:
    Apr 3, 2015
    Posts:
    137
    About XrSocketInteractor
    I have problems to configure it with compound objects (more than one mesh hierarchy).
    Let's say I have a CubeRootObject and a small cube chil d at one corner (fig A)
    If I use Socket Interactor on this object, the small child cube appear inside the root cube during the highlight (fig B).
    How can I fix this?
     

    Attached Files:

    • B.jpg
      B.jpg
      File size:
      45.1 KB
      Views:
      491
    • A.jpg
      A.jpg
      File size:
      20 KB
      Views:
      479
  16. piter00999

    piter00999

    Joined:
    Jan 5, 2018
    Posts:
    19
    Hello maybe someone found a way to programmatically put interactable in let's say direct interactor and another way around to remove holding by interactor interactable using code?
     
  17. mikeNspired

    mikeNspired

    Joined:
    Jan 13, 2016
    Posts:
    82
    You should read this faq. What you seek is there. Only works with "State Change".
    http://snapandplug.com/xr-input-toolkit-2020-faq/
     
    a436t4ataf likes this.
  18. dnnkeeper

    dnnkeeper

    Joined:
    Jul 7, 2013
    Posts:
    84
    I tried extending XRController with my custom InputDevice but couldn't override inputDevice property of XRController class. So I tried making my own version of XRController, lets say XRControllerExt. But then I couldn't use XRDirectInteractor because it depends on XRController instance, so I had to create XRDirectInteractorExt and then I stuck being unable to call internal method TryGetInteractableForCollider from XRInteractionManager... Is it not supposed to be extensible? Can I make and register a custom InputDevice keeping XR package intact?
     
  19. ironheadgames

    ironheadgames

    Joined:
    Sep 18, 2017
    Posts:
    5
    Hi, in Unity 2020.1, I still cannot see the XR Interaction Toolkit package even if I show preview packages. Anyone having this issue?
     
  20. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,092
    You're not crazy, in the package manager click on the + and select add from git url and fill in com.unity.xr.interaction.toolkit that should do it.
     
    Last edited: Jul 26, 2020
    harleydk likes this.
  21. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,933
    As with previous people with similar issues: Make a thread. Don't post it here. You won't get a response, and it's just adding noise. There is a whole forum here for such threads. Use it!

    ETA: hopefully that doesn't sound too negative, but ... specific scenarios you are 100x more likely to get a response if you make a thread.
     
    Last edited: Jul 26, 2020
  22. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,933
    Generally speaking ... XR IT has been carefully written to be non-extensible. This was - as far as we can tell - a complete accident, an unfortunate side-effect of good programming-principles being mis-used / used naively. We were promised back in March that they intend to reverse this and make it fully extensible, most likely in the next release.

    If you've got custom hardware, you could look at the custom hardware SDK and it might give you some extra options here (but I haven't looked at that, and it's aimed to be lower level: http://snapandplug.com/xr-input-too...Plugin-make-a-new-plugin-for-custom-hardware?)

    Until then your main option is to edit the Unity source directly and clone (or modify) existing classes. This is very easy/quick to do:

    http://snapandplug.com/xr-input-too...y-changes-every-time-I-update-the-XR-package?

    ...and use this to access the private methods: http://snapandplug.com/xr-input-too...hods-are-privateinternal---how-do-I-use-them?

    And it's worth reporting a bug with Unity (from the Window menu in Editor) to explain your situation, just to make sure they don't forget to fix it in the next release :).
     
    hessex, harleydk and dnnkeeper like this.
  23. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,933
    Considering how much has changed (I mean: just looking at the number of bugs I've logged myself! ;) But also all the other suggestions and improvements that the Unity XR team have talked about), I very much hope it's still preview! There's going to be LOTS of stuff for us to (re-)test. If it went straight to production that would be a nightmare for all of us.

    ...and I have a whole load of more suggestions/feature requests to add. (but I'm waiting for the first round of bugfixes and code-changes, because a lot of them will probably change as a result of code/API changes)
     
  24. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,933
  25. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,933
    I thought this *shouldn't* be needed? XR IT isn't on the list of officially deleted/hidden packages (https://forum.unity.com/threads/visibility-changes-for-preview-packages-in-2020-1.910880/) that 2020.1 now stops you from installing directly (and which require the magic-url trick).

    Is it a mistake? Needs filing as a bug?
     
  26. JRissa

    JRissa

    Joined:
    Mar 20, 2015
    Posts:
    12
    Found a bug with XR Socket Interactor when using Universal Render Pipeline.
    XR Socket Interactor is not working on Oculus Go (possibly issue is on Quest as well) when using URP.

    Placed a bug report (case 1266357) with sample project and below explanation:

    1. What happened
    XR Socket Interactor is not working with any XR Grab Interactable object, when using Universal Render Pipeline on Oculus Go. Bug is related on creation of new material on script "XR Socket Interactor" lines 74-88. Script is trying to create "Standard" material and fails on URP.

    Quick fix to get the XR Socket Interactor to work with URP on Oculus Go is to change the lines 74-88 like this:

    if (m_InteractableHoverMeshMaterial == null)
    {
    // create of default transparent shader
    var m_InteractableHoverMeshMaterial = new Material(Shader.Find("Universal Render Pipeline/Lit"));
    if (m_InteractableHoverMeshMaterial)
    {
    /* m_InteractableHoverMeshMaterial.SetFloat("_Mode", 2);
    m_InteractableHoverMeshMaterial.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.SrcAlpha);
    m_InteractableHoverMeshMaterial.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
    m_InteractableHoverMeshMaterial.SetInt("_ZWrite", 0);
    m_InteractableHoverMeshMaterial.DisableKeyword("_ALPHATEST_ON");
    m_InteractableHoverMeshMaterial.EnableKeyword("_ALPHABLEND_ON");
    m_InteractableHoverMeshMaterial.DisableKeyword("_ALPHAPREMULTIPLY_ON");
    */
    m_InteractableHoverMeshMaterial.SetColor("_Color", new Color(0.0f, 0.0f, 1.0f, 0.6f));
    }



    Bug might be also on other Oculus Android models (Quest), but I do not currently have Quest to test it.


    2. How we can reproduce it using the example you attached
    Build and run the project on Oculus Go (possibly also on Quest) and the XR Socket Interactors are not working.

    Modify the XRSocketInteractor.cs script lines 74-88 with below lines and the XR Socket Interactors start working (but not showing up Interactables hovering mesh:

    if (m_InteractableHoverMeshMaterial == null)
    {
    // create of default transparent shader
    var m_InteractableHoverMeshMaterial = new Material(Shader.Find("Universal Render Pipeline/Lit"));
    if (m_InteractableHoverMeshMaterial)
    {
    /* m_InteractableHoverMeshMaterial.SetFloat("_Mode", 2);
    m_InteractableHoverMeshMaterial.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.SrcAlpha);
    m_InteractableHoverMeshMaterial.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
    m_InteractableHoverMeshMaterial.SetInt("_ZWrite", 0);
    m_InteractableHoverMeshMaterial.DisableKeyword("_ALPHATEST_ON");
    m_InteractableHoverMeshMaterial.EnableKeyword("_ALPHABLEND_ON");
    m_InteractableHoverMeshMaterial.DisableKeyword("_ALPHAPREMULTIPLY_ON");
    */
    m_InteractableHoverMeshMaterial.SetColor("_Color", new Color(0.0f, 0.0f, 1.0f, 0.6f));
    }


    XRSocketInteractor.cs script should be modified to use different material configuration, when user is using URP on project.
     
    ROBYER1 likes this.
  27. piter00999

    piter00999

    Joined:
    Jan 5, 2018
    Posts:
    19
  28. ironheadgames

    ironheadgames

    Joined:
    Sep 18, 2017
    Posts:
    5
  29. aleksandarpopovic

    aleksandarpopovic

    Joined:
    Jun 1, 2018
    Posts:
    4
    Is there a way to clear XRDirectInteractor grabbed interactibles list? Or a way to reset it so it doesn't have any grabbed objects?
     
  30. mikeNspired

    mikeNspired

    Joined:
    Jan 13, 2016
    Posts:
    82
    I don't believe there is. If you are disabling an object or collider. You have to make sure the OnExit gets triggered. If you don't want to edit their code, you going to have to do the wonderful move the collider far away, wait for a physics update, and then disable the object.
     
  31. mtalbott

    mtalbott

    Joined:
    Dec 21, 2011
    Posts:
    125
    So I'm having a weird issue with UI Canvas Interaction. In Unity 2019.4.5f1, Interaction Toolkit 0.9.4, if I build the provided example VR scenes("UICanvas.unity" and "WorldInteractionDemo.unity"), everything works. If I replace the XRRig in the scene with any other rig, including a clone of itself, Interaction with UI Canvases no longer works. Has this happened to anyone else? I can't seem to think of any reason why this would happen.

    Edit: when I say "replace the XRRig", I mean in the Unity Editor. Not at run-time.
     
    Last edited: Jul 29, 2020
  32. T3ddyTheGiant

    T3ddyTheGiant

    Joined:
    Aug 1, 2018
    Posts:
    11
    I know this is like saying "try turning your computer on/off again"....but make sure the Canvas has a reference to the main camera in the scene. A similar situation has happened to me...
     
    harleydk likes this.
  33. mtalbott

    mtalbott

    Joined:
    Dec 21, 2011
    Posts:
    125
    I really appreciate it! That was it. I feel stupid now. I wrongly assumed If no Event Camera was applied it would just find and use Camera.main. Thanks again!
     
    gjf and T3ddyTheGiant like this.
  34. Thimo_

    Thimo_

    Joined:
    Aug 26, 2019
    Posts:
    59
    @Matt_D_work , @mfuad , @StayTalm_Unity ,

    I have a few questions regarding XR interaction toolkit.

    When will the first verified version release?

    Is there or will there be an elevation interactable?
     
    Last edited: Aug 9, 2020
  35. Kagyu

    Kagyu

    Joined:
    Mar 5, 2016
    Posts:
    96

    I can interact with dropdown UIs with XR interaction toolkit but the dorpdown and its' items never be highlighted when I put my pointers on it. Is my set up wrong? or is it a know issue?

    Unity 2020.1.0.f1
    HDRP8.2 XR
    Interaction Toolkit 0.9
     
  36. FishStickies94

    FishStickies94

    Joined:
    Jul 27, 2019
    Posts:
    70
    Any news on when the next update is? Last one was in April, so I'm a little worried this has been pushed aside.
     
    T3ddyTheGiant and Thimo_ like this.
  37. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,092
    Will there be a way to offset the XR Interactor Line Visual?
    At this point the line visual begin point is intersecting with the controller.
     
  38. stevendimmerse

    stevendimmerse

    Joined:
    Aug 7, 2018
    Posts:
    9
    It would be nice to expand XR Grab Interactable to work nicer with hinge joints as currently they fly around when you grab them. If the track rotation option wasn't just a bool but allowed you to specify what axis of rotation you wanted to check it would be much easier to make a lever as you could just track the rotation of the axis the hinge joint is rotating around
     
    ROBYER1 likes this.
  39. leonardfrancomichael

    leonardfrancomichael

    Joined:
    Jun 2, 2019
    Posts:
    7
    hi body, could you resolver this?
     
  40. Utarastas

    Utarastas

    Joined:
    Jul 27, 2017
    Posts:
    11
    How do I activate objects WITHOUT selecting them?
     
  41. hareharu

    hareharu

    Joined:
    Nov 22, 2014
    Posts:
    5
    You can invoke interactable onActivate/onDeactivate event. Just pass some interactor as parameter.
     
  42. joeysipos

    joeysipos

    Joined:
    Jul 28, 2015
    Posts:
    41
    I am seeing this same issue! How do I get these events to fire? Is it broke in the current version 0.9.4? Is there a bug open on this issue?
     
  43. tommyFXM

    tommyFXM

    Joined:
    Jan 3, 2019
    Posts:
    1
    Hi, I found a problem/bug with XR Interaction Toolkit raycasting system. Sometimes it locked to a gameobject with collider at 1 point. Like in this video.

    https://drive.google.com/file/d/1r2JfYaqrb1uzdlTBd3POh_TfCmqxpmgu/view

    Sometimes the line even locked at 1 point (no matter where you move your controller, the line stuck at a point on floor)
    Usually it become like this if I put the controller on the floor for about 15s - 1 min.

    Strange thing is, it only locked at the floor collider and never to other object (in that scene the only one object that have collider is the floor, on other scene I have some objects with collider and if the problem occurred, it only stuck at the floor)

    Anyone know how to fix this? Using unity 2019.4.1f1 with XRInteractionToolkit 0.9.4 with oculus quest link (played it from laptop)
     
  44. DanielRothmann

    DanielRothmann

    Joined:
    Feb 4, 2016
    Posts:
    10
    Poking around in the code, I learned that you can set a transform in the XR Ray Interactor's
    Attach Transform
    field - This will cause the ray to originate at that transform. I guess this depends that you didn't need the attach transform functionality for something else.
     
  45. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,092
    I̶ a̶t̶t̶a̶c̶h̶e̶d̶ ̶a̶ ̶t̶r̶a̶n̶s̶f̶o̶r̶m̶ ̶a̶n̶d̶ ̶r̶e̶f̶e̶r̶e̶n̶c̶e̶d̶ ̶i̶t̶ ̶b̶u̶t̶ ̶i̶t̶ ̶d̶o̶e̶s̶n̶'̶t̶ ̶s̶o̶l̶v̶e̶ ̶t̶h̶e̶ ̶p̶r̶o̶b̶l̶e̶m̶.̶
    edit: ah never mind the prefab didn't save. It works, thanks!
     
    Last edited: Aug 20, 2020
  46. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    Is there a define for XR interaction toolkit? I'd like to do the following without having to create my own define by examining if one of the classes is present.
    Code (CSharp):
    1. #if XRI_IS_AVAILABLE??
    2. using UnityEngine.XR.Interaction.Toolkit;
    3. #endif
    4.  
    5. #if XRI_IS_AVAILABLE??
    6. private void XRI_Method()
    7. {
    8.     // Do stuff here
    9. }
    10. #endif
     
  47. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,092
    Is it just me or does the scroll view not scroll when using the thumbstick on the controller?
    In editor using mouse events doesn't seem to scroll with the scroll wheel either because it resets its position?
    You can see the scrollbar going down but it resets the position again. Whereas if I'd force enable a standalone input module it works as usual.
     
  48. Gustavo-Quiroz

    Gustavo-Quiroz

    Joined:
    Jul 26, 2013
    Posts:
    38
    Hi guys, at Innoactive we are developing a tool that enables the quick creation and scalability of VR training apps.



    We actually switched from VRTK v3.3.0 to Unity’s XR Interaction Toolkit as our main VR interaction framework.
    Since, at its current status, the XR interaction toolkit does not fit all our interaction requirements, we have extended it a bit, solving some issues and adding features that I think it might be interesting for some of you, like adding precision grab, the ability for interactables to stop interacting (forcing an object grabbed to be dropped), generation of ”snap zones” (sockets) out of their target ”snappable objects”, and some more.

    Our tool, the Creator, and all its modules including our XR Interaction Component are open-source and completely free.

    If anyone is interested you are all welcome to participate, contribute, or simply discuss VR with us in our spectrum community or in our open-source projects.
     
    Last edited: Aug 22, 2020
    MaxInno, harleydk, Juliew and 6 others like this.
  49. janla

    janla

    Joined:
    May 8, 2013
    Posts:
    15
    Hi,

    is there a way to query the IPD or eye distance during runtime? I'm asking because I would like to get the actual camera positions of the right and the left eye.

    Thank you and all the best,
    Jan
     
  50. Utarastas

    Utarastas

    Joined:
    Jul 27, 2017
    Posts:
    11
    OnActivate/OnDeactivate does not get called unless the object is currently selected
     
Thread Status:
Not open for further replies.