updatePosition method

void updatePosition(
  1. Vector2 to, [
  2. double sensitivity = 1.0
])

Implementation

void updatePosition(Vector2 to, [double sensitivity=1.0]){
  final double x = ((to.x - from.x))/100*sensitivity;
  final double y = ((to.y - from.y))/100*sensitivity;

  position.x += x;
  position.y -= y;

  _tempPosition = position;

  from.x = to.x;
  from.y = to.y;
}