Hi all,
I’m trying to create an interactable UI on a fast-moving object (e.g., spaceship cockpit).
Starting with the XRIT Hands Interaction Demo I added a parent to the “Complete XR Origin Hands Set Up” and “Table” objects. Then I added a timeline animation simply moving it forward.
The UI on the table works fine if the “Spaceship” doesn’t move. But as soon I start the timeline/animation the UI is not interactable anymore. I also tried the same using a simple script moving the ship forward at a constant speed with the same result.
Does anyone have any idea how I can have a hand-interactable UI on a moving object?
(I’m using 2023.1 and XRIT 2.3.0 for this sample but eventually will need a solution for 2022.2)
Hmm you’re right I don’t think we considered moving canvases when computing the poke logic. We cache positions between frames in world space to evaluate the poke hover math. We’re working on an improvement to poke interaction that will allow it to track the velocity of the poke when estimating hover math, which can work instead of the cached value, so I’m interested if that will alleviate some of your concerns.
The poke select logic without the hover check enabled doesn’t rely on any cached data, though that’s not utilized with the canvas by default.
If you’re open to modifying the XRI Package code locally, you can go into the “TrackedDeviceGraphicRaycaster” code and disable the “enablePokeAngleThreshold” in the setup function. That will remove any use of the caching logic.

Thanks for the quick reply and the hints. I’ll look into TrackedDeviceGraphicRaycaster chances you suggested and give it a try.
I’m concerned that the update to the poke interaction you mentioned might not be enough for the Animator/Timeline scenario. Looking at the XRInteractionManager it seems that most of the work is done in Update(). It seems, to make it work for Animator scenario it should be done in LateUpdate(), shouldn’t it?
Hello,
I tried to disable enablePokeAngleThreshold as you suggested. Unfortunately the UI interactions still don’t work in both cases (script animation and timeline/animator).
Do you have any other suggestions?
Unfortunately I don’t have other tips for now. We’re working on a patch release for 2.3 that should hopefully address your issue however. I’ll try and come up with more test cases to make sure the fix resolved your issue.
Great, thanks for the info.
If it helps, I can provide you the sample project I’m using to test it.
Yes please that would be great.
Here the sample project I’m using. (README.md in Assets)
8888901–1215483–TMP XR Interaction Test.zip (2.82 MB)
Ok so that project was super helpful. I have a fix worked out. Hopefully I’ll be able to land it soon.
Btw a few notes on your project:
- Your version of the hands package is outdated - I recommend pre-.3 instead of.2. The hand mesh is WAY better and there are lots of little fixes.
- You’re not using the meta aim extension in openxr which means rays and pinch won’t work.
- I don’t recommend putting anything in the sample folders because those get overwritten if you try to update the samples.
- Your sample setup was kinda broken somehow. Not sure how. A fresh update of the samples resolves it.
Thanks for the feedback. As mentioned in my first post our target version will be 2022. I used 2023 because I somehow couldn’t install the hands package in 2022 last week (even using the “add package by name” link from the doc). But I just retested it in 2022 and it seems to work now. (Maybe something was temporary broken on the package server)
The actual project I’m working on is using MRTK 3. I was able to track down and fix the MRTK issues related to moving UI’s and then ended up finding XRIT also has this issue a layer below.
Thanks for looking into it and I’m looking forward testing your fix in XRIT.
1 Like
I’m also facing what seems to be the same problem in my project. When my frame of reference (carrying the XR Origin) is in motion, any grabbed Interactable lags behind the Interactor by what seems to be 1 fixed update’s worth of vehicle motion. As well, to grab the Interactable in the first place, I have to offset the interactor by that same amount (grabbing “behind” the .
I tried playing around with the script execution order in case that was the issue, but it had no effect.
The “enablePokeAngleThreshold” idea won’t work for me, I’m on 2.0.1 and it doesn’t exist in my version, seemingly.
Eager to hear about any upcoming fix or idea for a workaround I could try!
Hey so 2.3.1 came out and it should resolve your issues! Please let me know if it doesn’t.
Hello, I just tried 2.3.1 with my sample scene and all seem to work fine now.
Many thanks for the quick response and fix!
Hey I’m glad my fix solved your issue!
I spent the evening upgrading to XR Interaction Toolkit 2.3.1 and fixing some issues that arose from that (such as the fact you can apparently not interact with trigger colliders any more?).
Unfortunately, merely upgrading did nothing for my use case. While my vehicle is moving (carrying the XR Origin with it), any grabbed objects remain offset from the interactor, corresponding to the velocity, as before. Were there any other steps needed to get this to work? That “enablePokeAngleThreshold” modification for instance?
Hi. On my side I just tested UI elements interactions with XRIT 2.3.1. These seem to work as expected when the XROrigin is moving.
Unfortunately, I can’t say much about object grabbing etc.