Handles.DrawLine delayed

Currently I’m writing some Editor script and everything was fine until I’ve tried to create a line between selected node in my graph and mouse position
Basically code checks if the mouse is over any node and if user selects it and draws a line between the node and mousePosition

And now comes the issue. Everything is fine until I’m in range of the node, when the mouse is outside of it has to stop in one place for some time to draw line properly and when the mouse is moving line just freezes. Mouse position detection works fine. Any ideas?

It’s not because of the framerate. Debug.Log(secondPoint) works dine and has different values every frame when moving

Okay, I think I’ve found the issue.
for obvious reasons scene view doesn’t refresh itself frequently enough to spare the resources for other background tasks so that is the cause of that weird “snapping” after mouse
Everything you have to do is put command below at the end of OnSceneGUI( );

HandleUtility.Repaint( );

Have a nice day :heart: