1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 01:06:01 +08:00

Fixed reroute point snap centering

This commit is contained in:
Thor Brigsted 2018-08-27 11:29:34 +02:00
parent cf48e8ec85
commit cc72e44895

View File

@ -113,8 +113,8 @@ namespace XNodeEditor {
for (int i = 0; i < selectedReroutes.Count; i++) {
Vector2 pos = mousePos + dragOffset[Selection.objects.Length + i];
if (gridSnap) {
pos.x = (Mathf.Round((pos.x + 8) / 16) * 16) - 8;
pos.y = (Mathf.Round((pos.y + 8) / 16) * 16) - 8;
pos.x = (Mathf.Round(pos.x / 16) * 16);
pos.y = (Mathf.Round(pos.y / 16) * 16);
}
selectedReroutes[i].SetPoint(pos);
}