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:
parent
cf48e8ec85
commit
cc72e44895
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user