Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input stops working #31

Closed
Scrantch opened this issue Jul 29, 2020 · 18 comments
Closed

Input stops working #31

Scrantch opened this issue Jul 29, 2020 · 18 comments
Assignees
Labels

Comments

@Scrantch
Copy link

Scrantch commented Jul 29, 2020

Hi, I just downloaded and started evaluating your ar-sim tool. Seemed great out of the gate as everything was just working but I quickly found that input clicks just stop working where in the build they don't so it's not the code.

I am using Unity 2019.3.15f1, AR Foundation 3.1.3, and XR Interaction Toolkit 0.9.4 on MacOS 10.15.5 with AR-Sim 1.0.2.

I am placing several objects via my code and then manipulating them with XRIT. As I said, works in a build but in AR-Sim it works for a bit and then just.... stops. No more input is accepted for interacting with objects in AR via XRIT after a short time though the interface still works and I can still place them.

Thanks much...

@marwie
Copy link
Member

marwie commented Jul 30, 2020

Hello, thanks for your feedback!

Just to be sure: Are you testing your app with the Device Simulator or in Game View?
If Game View: Do you have the Device Simulator window open while testing?
If Device Simulator: Which version are you using?

@marwie marwie added arc: interaction 👆 type: bug 💥 Something isn't working labels Jul 30, 2020
@hybridherbst
Copy link
Contributor

I think I've seen a similar issue in the past but thought we'd fixed it. In addition to the questions above, would you be able to provide a repro project? (You can also share it via email if privacy is an issue).

@Scrantch
Copy link
Author

Scrantch commented Aug 4, 2020 via email

@marwie
Copy link
Member

marwie commented Aug 4, 2020

No worries, thanks for getting back at us.
That's really weird - the issues described above only happened in a device-simulator context on iOS I think. I'll setup a project with your setup and try to reproduce it tomorrow!

@Scrantch
Copy link
Author

Scrantch commented Aug 4, 2020 via email

@marwie
Copy link
Member

marwie commented Aug 5, 2020

Also, I just noticed that after it freezes when I stop the Game View play an error pops up:
InvalidOperationException: Can't call "GetChanges" without "Start"ing the reference-point subsystem! UnityEngine.XR.ARSubsystems.XRAnchorSubsystem.GetChanges (Unity.Collections.Allocator allocator) (at @./Runtime/AnchorSubsystem/XRAnchorSubsystem.cs:50) UnityEngine.XR.ARFoundation.ARTrackableManager`4[TSubsystem,TSubsystemDescriptor,TSessionRelativeData,TTrackable].Update () (at @./Runtime/AR/ARTrackableManager.cs:107)
Not right when it freezes but only after stopping Play mode so not sure it’s related but thought I’d send it along. Never see this when running on device or elsewhere.

On Aug 4, 2020, at 9:44 AM, Grant Anderson @.> wrote: Hi, sorry for the delay. No, not using the Device Simulator nor was it open. Been using the Game View window. I went through and removed a bunch of packages thinking there may have been a conflict but to no avail. It works for about 30 seconds and then just stops. I am using AR Foundation and XR Interaction Toolkit for input gestures. Can’t really send you a repo due to security unfortunately. What else can we do? Would love to get this working… Thanks. > On Jul 30, 2020, at 9:45 AM, Marcel Wiessler @. @.***>> wrote: > > > Hello, thanks for opening an issue and your feedback! > > Just to be sure: Are you testing your app with the Device Simulator or in Game View? > If Game View: Do you have the Device Simulator window open while testing? > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub <#31 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLH7OJHABZPZGUHX6OOQITR6GPRPANCNFSM4PLZUSJA. >

Hello, thanks for the report - that's a known issue with AR Foundation, which we can't fix ourselves unfortunately (#7) but a bug has been reportet (1268386)

I just setup a project for repro and found that I won't get any Keyboard events after having clicked from GameView to SceneView and attempt to use GameView again afterwards - left clicking still works and after having left clicked in GameView once again Input starts working again. Do you think that could be related to your issue (changing window focus?)

When Input is not working anymore I assume neither left clicking nor right-presseing and using WASD work anymore?
Do you think you could send a screenshot of the "Input Helper" component in debug mode once Input has stopped working? (That component will be added to the camera when entering playmode)

image

@marwie
Copy link
Member

marwie commented Aug 5, 2020

Hello, I think I found a fix for the issue - please try the new preview version 1.0.3-preview I just released

@marwie marwie self-assigned this Aug 5, 2020
@hybridherbst
Copy link
Contributor

@Scrantch as marwie said above just with a Ping :)
Please try 1.0.3-preview, you can update to the new version directly from the Package Manager Window inside Unity.
Let us know how it goes!

@Scrantch
Copy link
Author

Scrantch commented Aug 6, 2020 via email

@hybridherbst
Copy link
Contributor

hybridherbst commented Aug 6, 2020

We worked around a bug in Unity's code, as usual 🥇
There's some internal Unity stuff that can be used to inject touches. Turns out that breaks when used properly (e.g. injecting touches with incrementing IDs). At a random point, even with all our data being correctly sent to Unity, Unity just stops processing the events it seems.

When only reusing touch 0 all the time (which is not how a touchscreen works) it seems to not break.

Great that it's solved for you! I opened #32 to keep track of future work in this area.
Could you open a Feature Request for navigation controls, ideally with some descriptions of what you'd like to see / how you'd like to navigate? EDIT: @marwie added some relevant questions below - @Scrantch would be great if you answer them in that new feature request you'll hopefully create. Thanks!

@marwie
Copy link
Member

marwie commented Aug 6, 2020

I'm glad to hear that! Let me know if you run into any more problems or something does not work as expected.

Previously we incremented the touch ID when calling the private touch method that's also used by Device Simulator - but that seems to cause issues at some point, so we changed the code to always use ID 0 (similar to how Device Simulator does it as of now). We will have a look at this again when we tackle multitouch

By zooming straight into the scene do you mean

  1. zooming in by scrolling the mouse wheel
  2. or "flying forward" just like in scene view using WASD
  3. or pressing F to focus/zoom closer on some object in the center of the screen?

There is an option for 2 already ("Fly Mode"). You can change that in preferences to fly mode already

image

@Scrantch
Copy link
Author

Scrantch commented Aug 6, 2020 via email

@marwie
Copy link
Member

marwie commented Aug 7, 2020

For multitouch Id suggest to use LeanTouch for now until we have a better solution (ideally in collaboration with the Unity team). We have been using LeanTouch very successfully in production using ARSimulation!

@Scrantch
Copy link
Author

Scrantch commented Aug 7, 2020 via email

@marwie
Copy link
Member

marwie commented Aug 8, 2020

Hi @Scrantch just wanting to let you know that I started working on having a focus feature. I created a new issue to track progress. Please reply to the new issue #33 if you have any requests or comments. It would be nice to get some feedback from you if that is roughly what you imagined :)

@Scrantch
Copy link
Author

Scrantch commented Aug 10, 2020 via email

@marwie
Copy link
Member

marwie commented Aug 11, 2020

I havent published a new version with it yet, it will be in the next update tho

@needle-tools needle-tools locked as resolved and limited conversation to collaborators Aug 11, 2020
@hybridherbst
Copy link
Contributor

Please continue discussions in #33 if there's additional questions :) Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants