The i++ is a counter that increases so at the start its 0 and once it goes through one iteration of the loop it increases so we can iterate through an array. Hopefully I explained that well. Ill try and post some real code real soon. Also just noticed some errors I didnt catch like at the start you should be using the ls…
Pseudo code would be locators = xform all locatorsfor vert in selectedVertices vertloc = xform vert, world space for int i = 0; i < size of locator array; i++ locatorLOC = xform locator world space distanceTEMP = distance between locator(using locatorLOC and vert (vertloc) //First run so store the first distance if (i ==…