Parcourir la source

disabled correction of touchEvent-position due to changes to finger.direction

Alexander Hendrich il y a 11 ans
Parent
commit
70e66435f8
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      bbiwarg/Detectors/Touch/TouchDetector.cs

+ 3 - 0
bbiwarg/Detectors/Touch/TouchDetector.cs

@@ -32,12 +32,15 @@ namespace bbiwarg.Detectors.Touch
                 float floodValue = getFloodValue((int)tipPoint.X, (int)tipPoint.Y);
                 if (floodValue > floodValueThreshold)
                 {
+                    /* disabled -> direction doesn't along finger
                     //correct touchEvent position
                     Vector2D direction = finger.Line.Direction;
                     float directionFactor = -10;
                     float x = Math.Min(Math.Max(tipPoint.X + directionFactor * direction.X, 0), depthImage.getWidth()-1);
                     float y = Math.Min(Math.Max(tipPoint.Y + directionFactor * direction.Y, 0), depthImage.getHeight()-1);
                     Vector2D tep = new Vector2D(x,y);
+                     */
+                    Vector2D tep = tipPoint;
 
                     touchImage.setTouchAt((int)tep.X, (int)tep.Y, TouchImageState.touchDetected);
                     TouchEvent touchEvent = new TouchEvent((int)tep.X, (int)tep.Y, floodValue, finger);