Detecting double click (or tap)

What is the recommended way to detect double clicks (or taps) in the ViewPort? Currently I’m detecting touch begin, moved and ended like this (sorry, this is in C#)

		Input.TouchBegin += OnTouchBegan;
		Input.TouchMove += OnTouchMoved;
		Input.TouchEnd += OnTouchEnded;

Do I have roll my own looking at the time of the TouchBegan events?

UI elements have the E_UIMOUSEDOUBLECLICK event that you could utilize, for everything else you would probably have to code the handling yourself.

I have no UI elements in the app. So unless anyone else has a suggestion, I will code it myself.

I suppose I could place a transparent UI element in the positions where I want to detect the double click. Seems kind of hokey though.

2 Likes