googlevr / cardboard

Open source Cardboard SDK and samples
Other
1.49k stars 256 forks source link

[iOS] HelloCardboardInputSystem: IsTriggerPressed does not work periodically #457

Open makakaorg opened 8 months ago

makakaorg commented 8 months ago

SPECIFIC ISSUE ENCOUNTERED

HelloCardboardInputSystem scene: IsTriggerPressed flag in CardboardReticlePointer.cs does not work periodically on iOS

SMARTPHONE (please complete the following information):

STEPS TO REPRODUCE THE ISSUE

  1. Open Scene
  2. Point and Tap on Several Treasures
  3. Tap on the Screen (i.e. IsTriggerPressed flag) periodically doesn't work - The object does not disappear

EXPECTED BEHAVIOR

Objects disappear every time you Point at them and Tap

VERSIONS USED

What version of Google Cardboard are you using? Cardboard XR Plugin 1.24.0

If you are using Cardboard XR Plugin:

lneumarkt commented 7 months ago

Thank you @makakaorg for reaching out.

I’ve tried to replicate the problem on my end using Unity 2022.3.21 in different iPhone devices:

But unfortunately I couldn’t reproduce the bug.


Just to clarify, IsTriggerPressed is not a flag but a method that checks if the screen was pressed.

To help us identify this bug, would you be so kind as to add some logs to check if the screen is being touched correctly when pointing at an object?

Please add the following line here to print the value of touch.phase to verify that the screen is being touched:

Debug.Log(touch.phase.ReadValue());

Then add another log here to verify that the object is being pointed at.

Debug.Log(“Gazed at object.”);

The expected result is that when looking at the treasure and touching the screen both thing should happen:

Please check this and let us know the outcome. Thanks!