# Multi-touch gear for navigation

**URL:** https://discourse.processing.org/t/multi-touch-gear-for-navigation/15581
**Category:** Processing for Android
**Created:** [November 17, 2019, 3:55pm UTC](https://discourse.processing.org/t/multi-touch-gear-for-navigation/15581 "2019-11-17T15:55:40Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)
#### Post date: [January 28, 2020, 5:05pm UTC](https://discourse.processing.org/t/multi-touch-gear-for-navigation/15581/6 "2020-01-28T17:05:47Z")

</div>

@Alhugen  
If you place code below above the snippet of your code I posted above; the arrow will point to the top of your isosceles triangle, no matter the sequence of the touches.  
Of course you also have to change to  
float dx = touches[top].x - centreX;  
float dy = touches[top].y - centreY;

```auto
      md = min((int)dist1, (int)dist2, (int)dist3);
      if((int) dist1 > md) b_dist1 = true;
      if((int) dist2 > md) b_dist2 = true;
      if((int) dist3 > md) b_dist3 = true;
      if(b_dist1 && b_dist2) top = 0;
      if(b_dist1 && b_dist3) top = 1;
      if(b_dist2 && b_dist3) top = 2;
      b_dist1 = false;
      b_dist2 = false;
      b_dist3 = false;
/*
Of course you need to declare the global vaiables
boolean b_dist1, b_dist2, b_dist3;
int top;
float md;
*/

```

---

_[View the full topic](https://discourse.processing.org/t/multi-touch-gear-for-navigation/15581)._
