Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Object Size

Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
10-22-2005 18:49
So I'm attempting to call an object size on_rez...

...llGeometricCenter or whatever gives me a great "weighted" center....but I'm really wanting the size of the object relative to the root prim--as this is how objects are positioned in SL (position relative to center of root prim)...


...any ideas?

I'm currently workin' to figure out it...but...right now I'm blank...
Cid Jacobs
Theoretical Meteorologist
Join date: 18 Jul 2004
Posts: 4,304
10-22-2005 19:07
I think what you are looking for is llGetBoundingBox , "Returns the bounding box around the object or avatar with the key object (including any linked prims) relative to the root prim, in a list: [ (vector) min_corner, (vector) max_corner ]

Note: When an avatar sits on an object, he becomes linked to it - and the bounding box of the avatar will now include the object they are sitting on."

so you would want to call something like

CODE
default
{
on_rez(integer s)
{
llGetBoundingBox(llGetKey());
}
}
_____________________
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
10-22-2005 19:12
Thanks...I think that might be it. Appreciate the help and direction.