Closed Nopey closed 7 years ago
Hi, thanks for the improvement!
Looks way better now indeed, there were some behaviours I didn't like though, f.E. when a node input is right above a node output (offset.x is 0) then the connection is completely straight.
So, I made some more adjustements based on yours and added three parameters (including your 100f). Basically it now also has a minimum direction when offset is stretched in one direction but is sill straight when positions are very close to each other;)
Here's a test showing all positions:
Will update code right now, I also wrapped everything neatly in parameters and a function in NodeEditorGUI...
You want to add anything or should I merge?
I felt the need to do something small to get acquainted with this codebase, so I made the curves prettier. They used to snap to a different angle when you crossed the space above or below a knob with the mouse while drawing a new connection from it. Comparison of curves: (Blue is improved, Red is previous. Top right connection is most important change)![screenshot 2016-12-24 11 48 47](https://cloud.githubusercontent.com/assets/4543739/21469164/a8ca61a0-c9f1-11e6-9f4e-b719b16e7318.png)
TODO: Move the 100f in Node.cs and NodeEditor.cs to a single location somewhere. Either fully remove NodeEditorGUI.GetSecondConnectionVector or re-enable it. TLDR: I made the connections act a little more like blenders, and have stopped using the NodeEditorGUI.GetSecondConnectionVector function