|
Chrysala Desideri
Scarlet Scriptrix
Join date: 4 Mar 2007
Posts: 65
|
09-24-2007 17:52
I would like to have an objects bounding box be represented as a box by a model... i can scale it fine, if i can just make it a size vector!
what it gives me is basically the "<0,0,0>" and "<max,max,max>" of it's bounding box respect to center of prim (root of set in orginal) right? ok now what do i do?
Thanks for any help and your patience...
|
|
Chrysala Desideri
Scarlet Scriptrix
Join date: 4 Mar 2007
Posts: 65
|
09-24-2007 19:49
found it!!
list ciccio = llGetBoundingBox(obj_key); //original object
float scale = 0.2; // 1/5 model scale
vector v1= llList2Vector(ciccio,0); get 1 corner vector v2= llList2Vector(ciccio,1); get the opposite
vector size = < (-v1.x+v2.x) , (-v1.y+v2.y) , (-v1.z+v2.z) >; // invert the negative and add to positive, or just double positive as it's always a box
llSetScale(size*scale); // make the model
|