Mixedrealitytoolkit-unity: OnPointerClicked's IMixedRealityPointerHandler is called even after a long drag

Created on 9 Jul 2019  路  5Comments  路  Source: microsoft/MixedRealityToolkit-Unity

Describe the bug

When implementing interface IMixedRealityPointerHandler, OnPointerUp and OnPointerClicked are always called together: this means that even after a long gesture (drag, manipulation, long tap), the OnPointerClicked method is called.

To reproduce

Steps to reproduce the behavior:

  1. Add a script implementing IMixedRealityPointerHandler that logs calls to OnPointerClicked
  2. Run the scene and do a long gesture
  3. OnPointerClicked is always called.

Expected behavior

We would expect OnPointerClicked to be called only when the gesture is short (the delay between OnPointerDown and OnPointerUp should be small) and stationary (it's a click and not a swipe).
Despite the name difference, as of now, OnPointerUp and OnPointerClicked are identical in their use.

Screenshots

2019-07-09_10-05-32

Your Setup

  • Unity Version [e.g. 2018.4.2f1]
  • MRTK Version [e.g. v2.1]

Target Platform

  • HoloLens
  • HoloLens 2
Bug

All 5 comments

@lukastoenneMS @keveleigh

No strong opinion on this, it's not really my area and seems more like a design decision. Possibly a breaking change if OnPointerClicked is not raised any longer for long clicks.

It's somewhat related to #5051, where we used to use the GestureRecognizer Tap as a click in HTK. The tap gesture is more strongly defined and does have a time component to it.

I think this is the same as this issue: #4998
As I noted there, UnityTouchController already works this way.

Closing this as a dupe of #4998

Was this page helpful?
0 / 5 - 0 ratings