12-04-2004 05:38
CODE
llDetectedMass(key object) {
float volume;
vector min;
vector max;
float mass;
list boundingBox;
vector size;


boundingBox = llGetBoundingBox(object);

min = llList2Vector(boundingBox,0);
max = llList2Vector(boundingBox,1);

size = -min + max; //get the size of the object..
volume = size.x * size.y * size.z; //volume math
mass = volume * 10; //then multiply by ten
return mass;

}
_____________________