title: How to make a new created line of specific length?
body: <p>I need the line I am drawing to be of specific length. I can detect when it reaches the required length but if the user moves the mouse faster it could make the line longer than intended.</p>
  <p>Heres a video of the issue I am having, when I move the mouse slowly works great but speed gives issue: <a href="https://www.youtube.com/watch?v=4wkYcbG78TE" rel="nofollow noreferrer">https://www.youtube.com/watch?v=4wkYcbG78TE</a></p>
  <p>Here is the code where I create and detect the length of the line.</p>
  <pre><code>if Input.is_action_pressed(&quot;Left_click&quot;): #This checks the distance between last vector and the mouse vector
          #points_array[-1] = get_global_mouse_position() # Gets the last position of the array and sets the mouse cords
          var length = clamp(points_array[-1].distance_to(get_global_mouse_position()),0,20)
          if length == 20: # if its long enough create a new line and set it to mouse position
              var cords = get_global_mouse_position()
              print(cords)
              points_array.append(cords)
  </code></pre>