XR Interaction Toolkit 1.0.0-pre.3 pre-release is available

We have just published a new preview of the XR Interaction Toolkit (XRI) that brings a number of bug fixes and improvements. This version is available now for Unity 2019.4 and later, and will be included in 2021.1 in an upcoming patch release. For those who want to experiment with XRI, the best way to start is with our samples available at GitHub - Unity-Technologies/XR-Interaction-Toolkit-Examples: This repository contains various examples to use with the XR Interaction Toolkit. As always, you can refer to our documentation for more information.

Pre-release
This 1.0.0-pre.3 version of the XR Interaction Toolkit is considered pre-release. Pre-release packages are supported packages in the process of becoming stable and will be available as production-ready by the end of this upcoming 2021 LTS release. Starting in 2021.1, Unity is changing the way we publish and show packages in the Package Manager, and is designed to provide clear guidance around a package’s readiness and expected support level. For pre-release packages to appear in Package Manager, they must be enabled in Edit > Project Settings > Package Manager. There will be additional iterations of XRI before we get to the final 1.0.0 release.

What’s new
For a full list of changes, refer to the Changelog in our documentation.

Many of the changes and fixes in this version were a direct result of feedback we received from the forum and from reported bugs. Thank you to everyone who took the time to make these issues known to the team and for your feedback!

Notable changes

  • Derived behaviors which added serialized fields will no longer need custom Editor classes to see them in the Inspector. This is an improvement to the changes made with the previous 1.0.0-pre.2 version where the custom Inspector appearance applied to derived classes, but required writing Editor classes to insert additional values in the Inspector.
  • Added support for Input System touches to AR behaviors. Projects no longer have to enable the old Input manager, and can now set Active Input Handling to Input System Package (New).
  • Fixed multiple bugs with Ray Interactor, including the end of the Projectile Curve lagging behind and appearing bent while moving the controller fast (1291060), being able to still interact with Interactables that were behind UI (1312217), and frame latency during locomotion and while aiming at UI.
  • Additional properties have been added to Ray Interactor, Grab Interactable, and AR components to allow for more tweaking of behavior. Additionally, several methods in Ray Interactor have been added or changed to virtual or public to allow developers to have more control and to get information about UI hits.

Known issues
Use the Unity Issue Tracker for Package: XR Interaction to see the active issues.

  • The attach point for Grab Interactables can be inconsistent between Movement Type values (1294410)
  • Custom reticles get displayed on objects without a custom reticle (1252565)
  • Socket Interactor can apply the wrong rotation to an interactable and cause the interactable to skew in scale when the interactable has a parent with a non-uniform scale (1228990)
  • Grab Interactables can cause undesired behavior when using Continuous Move locomotion where the Character Controller can be blocked from moving while holding it, or cause the rig to rapidly move away when the object overlaps with the Character Controller
  • The Default Input Actions sample asset uses the wrong pose bindings for Windows Mixed Reality controllers, causing the controllers to point at the wrong angle
  • Interaction Manager throws an exception when an Interactor or Interactable is registered or unregistered during event handling and processing
  • Interactables with multiple Colliders are removed from valid targets list of Direct and Socket Interactors when any Collider exits bounds

Deprecated members
As we approach the final 1.0.0 release, properties, methods, and events that are currently marked as Obsolete or Deprecated will start to be elevated from warnings to errors before ultimately being removed from the package for the final release. This process will begin to happen starting with the next 1.0.0-pre.4 release. As more users begin to use the package, we want to eliminate potential confusion from the different members available and improve the experience while developing in an IDE with code completion and member lists.

Roadmap
Use the public roadmap to see our latest plans, upvote existing feature requests, and/or submit new feature requests. We are currently working towards a public 1.0 release this year for Unity 2021.2 (LTS). Most of our focus and development efforts now are on bug fixes, UX improvements, and polished documentation & samples. The feature set for public release will primarily reflect what exists today.

Sharing feedback
This forum is the best place to open discussions and ask questions. As mentioned above, please use the public roadmap to submit feature requests. If you encounter a bug, please use the Unity Bug Reporter in the Unity Editor, accessible via Help > Report a Bug. Include ā€œXR Interaction Toolkitā€ in the title to help our team triage things appropriately!

1 Like

Is there a workaround for this issue? I think it’s messing with my pistol holsters

You may be able to edit the model(s) so that the scaling is baked into the asset so that everything imports at (1, 1, 1) Transform scale at the same proportions to avoid the issue. You may also be able to alter the hierarchy so it doesn’t have any parents with scaling.

Is it just me or does it appear that the world space canvas now renders on top of the scene? Besides my own project I’ve also tried the XR Toolkit samples and here the world space canvas is also rendered on top of everything else. That’s not what I’ve been expecting. I would expect a world space canvas to be hidden by objects in front of it. If this is expected behaviour (on Unity’s side) how would I fix it? Using Unity 2020.1.7f1 and XR Toolkit 1.0.0-pre3

I’m having a problem with the Device Simulator. No matter what I do, I can translate and rotate the hands but I can only translate the head. Head rotation is broken for me. I tried changing key binds. I tried using stationary instead of room-scale. Neither worked. I can even translate both hands and the head at the same time. But when I hold ā€œRotate Mode Overrideā€ or press ā€œToggle Mouse Transform Modeā€ only the hands rotate while the head simply stops.

I’m using Unity 2020.3.0f1 and XR Toolkit 1.0.0-pre3 with the new input system in a brand new scene.

I added the following code below the line at XRDeviceSimulator.cs:1429 to try and debug

Debug.Log( "anglesDelta: " + anglesDelta + "\tm_CenterEyeEuler: " + m_CenterEyeEuler + "\tm_HMDState.centerEyeRotation: " + m_HMDState.centerEyeRotation );

This was the result:

I also tried to change the sensibility of Mouse Rotate Sensitivity but that didn’t work either. It just made the hands rotate faster.

Any idea on how should I fix this?

Are you using the Built-in Render Pipeline, High Definition Render Pipeline (HDRP), or Universal Render Pipeline (URP)? Which version of the High Definition RP package or Universal RP package are you using if so? Are the objects in front of the UI using materials that write to the depth buffer? Are you experiencing that only when deployed to the HMD device or in the Unity Editor also? When using the VR Example project, I am seeing 3D objects closer than the UI occlude it. You could try updating to the 2020.3.1f1 LTS release.

If you have an HMD device connected to your PC and have the plug-in provider for it enabled in Edit > Project Settings > XR Plug-in Management under the PC, Mac & Linux Standalone settings tab, it may be conflicting and overriding the simulated rotation. If so, try unplugging it or disabling the plug-in provider.

I don’t have any HMD connected. I had both OpenXR and OpenVR Loader plug-ins activated but keeping only OpenXR on didn’t solve the issue, sadly. However, inspired by your answer I tried a lot of combinations of settings in the XR Plug-in Management and made it work.

Turns out that having either the Mock Runtime in XR Plug-in Management > Open XR > Features or Mock HMD Loader in XR Plug-in Management on breaks the head rotation of the simulated HMD. I had to have both deactivated for it to work. Which is a bummer as this makes the HMD camera render as a normal camera, not as a HMD one (I need to see the occlusion mesh).

2 Likes

Just wanted to say thanks for continuing the development of the toolkit, it’s been really helpful.

I have 2 suggestions -

  • If you create an Action based Rig, I think the Input Action Manager script should be automatically added to the scene in the same way the XR Interaction Manager script is. At the moment there’s no obvious reason why you’re controllers don’t move unless you add this script.

  • It would be good if the toolkit could automatically setup or prompt you to change the project fixed timestep to match the refresh rate of your headset. When I first used the toolkit I thought the jitter when moving physics objects was something to do with the toolkit itself.

I am using the Built-in render pipeline and it was showing in the editor I don’t think I had gotten round to checking it on a device yet. Now several days, a windows update and many restarts later the problem seems to have disappeared from my own project apart from one issue remaining. TextMeshPro - Text (UI) assets are still rendered on top of everything else (both in editor and in device). That’s to say … the .sdf TMP_Font assets that I copied from a previous project (and different Unity version) are exhibiting this problem. The default .sdf that comes with the TextMeshPro installation behaves correctly. I will delete the copied versions and recreate them. I will also check the VR Example project for any changes. But that’s for later I gotta run now.

I’m glad you were able to work around it! If you report that bug about it not working when the Mock HMD is enabled, we can fix that in a future version.

We may be able to detect it in the situation that a dev has a preset set for the ActionBasedController, and it contains a reference to an Input Action Asset, and there isn’t currently an Input Action Manager in the set of opened scenes that has a reference to the same Input Action Asset, and determine that we should add one to enable them, but we can’t be sure that is what the dev wanted to do. However it is a common problem that trips up some of our users, so we’ll look into doing this.

Some of this will be addressed because we are planning on creating a VR template in Unity Hub that will have XR Interaction Toolkit with recommended project settings and a rig already set up so users won’t have to manually do those steps to set up the rig and input actions. We are also going to be improving the documentation of the package, especially around new users and the different grab movement types, which should help to explain some of these steps.

3 Likes

This is getting more interesting by the minute :slight_smile: This morning I started up the project and the problem was back in the editor. I was about to try upgrading the project as you suggested when I remembered your question about if the problem also occurred on the device. So I tried it on the device and lo and behold it was working on the device with the exception of the tetxmeshpro issue mentioned above. Also after exiting play mode the editor was behaving correctly as well with afore mentioned exception.
Next I changed all the font assets to the default font asset that is part of the textmeshpro package. That worked correctly in the editor and on the device. I deleted the copied font assets and a textmeshpro material that somehow made it into my fonts folder and recreated the font assets. After assigning them both the editor and the device behaved in the manner expected.
Next I quit Unity and started it back up. The problem was back in the editor but disappeared after entering and exiting play mode for the first time with the device connected. I guess I can live with that,

@chris-massie is there a method to reset the camera forward to fit the rig forward? and reset the camera center to the Rig center?

@chris-massie

This might not be a bug perse, but I saw that multiple people encountered it. When I use the AR side of the interaction toolkit, I want to extend and make custom variants for translating,scaling,rotating etc. However some nessesary code is locked as private/internal or through other ways. In particular ā€˜GestureTouchesUtility.cs’ is private and I want to access it. Also the gesture.Cancel() function in ARScaleInteractable.cs is not accessible. It would be amazing if you would make all or most methods public available for us to use in custom implementation. Thanks in advance!

Does the XR Socket Interactor somehow stores the (direct) Interactor that but the interactible in it? I’m getting a weird behaviour where a gun keeps poping back into my hand when it’s holstered in a socket and I press Select on my controller. I’ve put the socket a mile a away to make sure there is no collider interfering. If so, I can I somehow disable that?!

Edit: Seems like it is because I’mparenting the Object…

Edit2: Okay, after a few more testing I came to the conclusion that something has changed from 2020.3.0 to 2020.3.1 (and 2 too).
Here is the situation: I’m trying to make a gun holster which is a XR Socket Attached to the player. On Socket Enter, I parent the gun to the holster so it doesn’t lag behind when I move the character (teleport is no option!). This was never a problem until I updated to 2020.3.1, because now, when I put the gun in my XR Socket and make it a parent of the socket, I can always select. The gun will always pop in my hand. It even does that, when the Socket isn’t even connected to the player. You can walk always from it and the gun with be in your hand once hit select.

This is extremely inkonvenient. Reverting to 2020.3.0 now

It’s probably kind of hard to understand what the issue here is. I’m having trouble myself to put this in accurate words. But maybe someone will investigate this or make an option to the Grab Interactiable that it would parent to the interactor in way that works better than my spaghetti code.

Thank you for your attention and suggestion. I just finished submitting the bug. In case someone wants to follow the report: https://fogbugz.unity3d.com/default.asp?1325407_eeatp68lrmr50urv

1 Like

The Camera in a typical XR Rig setup is driven by the tracked HMD pose every frame. This means that if you try to modify the Transform of the Camera, it will be overridden by the Tracked Pose Driver when it updates to match the tracked values reported by the device. You will want to modify the Rig Transform instead to control where the player is.

There are various convenience methods in XRRig that allows you to update its position relative to the Camera position to help with doing this. The XRRig also has references to the Rig GameObject and the Camera GameObject, so you can do whatever calculations you need to manipulate the Rig.

What result are you hoping to achieve with what you are asking? There may be another way to control for what you are trying to do rather than trying to realign the Camera.

If you have a reproducible bug, you can submit a bug report using Help > Report a Bug. There shouldn’t be any change in behavior between those versions of Unity.

We may create an upcoming example to demonstrate having a Socket Interactor parented to the XR Rig to show how to do this.

umm, it’s like holding down the oculus button for a while then it will reset the view, is this possible?
Maybe method like InputTracking.Recenter? because it’s obsolete

XRInputSubsystem.TryRecenter is the replacement method for Recenter. You can get the input subsystem using SubsystemManager.GetSubsystems (SubsystemManager.GetInstances in 2019.4).

Hi everyone!
Does XR Interaction Toolkit work with webvr?

We don’t currently support WebVR/WebXR with XR Plug-in Management, so the input data that XRI depends on will not work out of the box. However, as long as you are able to pipe input into the Input System, XRI could work with it since XRI uses the Input System as its input abstraction and doesn’t really care about the source of that input.