Notifications
Clear all
[Closed] Finding the furthers vertex in an axis
Feb 01, 2012 3:31 pm
So I’ve got a piece of script that centres the pivot on an editable poly and then centres the pivot onto the origin.
What I then want to do is find out which vertex is the highest/lowest on the z, x or y axis and move the model by that much.
So if the lowest vertex is -100 on Z, I want to move the model up by 100 on Z. I can then obviously change the code for X and Y.
Thanks guys, I’ve only just started playing with MaxScript but am having a whole bunch of fun. This is the first maths type thing I’ve had to do so a bit of a new area.
1 Reply
Feb 01, 2012 3:31 pm
or…
use iterations to get x/y/z value of every vertex and compare it with previously found vertex
or…
get size of bounding box(actually it’s the same) and compute distance form Top/Bottom/Left/Right… to pivot.