I've got the sorting by position figured out. But then how do I sort them in relation of there pos compared to the "start object position" and then alter the objects wirecolor, in order based on there position?
positions = for i=1 to selection.count collect (selection[i].pos)
StartPos = $start.pos
fn fnCompareDist v1 v2 =
(
local d = (length v1)-(length v2)
case of
(
(d < 0.): -1
(d > 0.): 1
default: 0
)
)
qsort positions fnCompareDist
for p in positions do print p
for p in position do p.wirecolor = [i*25,i*50,(5-i)*50]
By JokerMartini · 2011-03-30