Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llRezObject question....

Trent Hedges
TrentCycle & GRAPHICA
Join date: 4 Sep 2003
Posts: 198
11-09-2004 08:53
hey gang,

I want to rez a linked set of objects to a specific position vector - i have tried using the vector returned by llGetPos(), and the vector returned from (llGetPos() + llGetGeometricCenter()) but they still seem to rez in the wrong location ?!

How can i get accurate information about where i want to rez my linked set? I can't stand diddling around with setting it in the script then adjusting then setting then adjusting... argh...


help?

Most flabergastedly yours,

trent
Tiger Crossing
The Prim Maker
Join date: 18 Aug 2003
Posts: 1,560
11-09-2004 11:44
llRezAtRoot()


Woot! Happy dance...

I've been asking for this for a year, and it JUST became available with the 1.5.6 update. (Though not because I've been asking for it...)

This function takes the exact same parameters as llResObject, and does the exact same thing, BUT... It uses the root prim as the center of positioning and rotation! :)

Enjoy! I know *I* am! :)
_____________________
~ Tiger Crossing
~ (Nonsanity)
Zuzi Martinez
goth dachshund
Join date: 4 Sep 2004
Posts: 1,860
11-09-2004 11:49
is that talking about the root object of the object you're rezzing or the root of the rezzer? the wiki knows not of what you speak.
Tiger Crossing
The Prim Maker
Join date: 18 Aug 2003
Posts: 1,560
11-09-2004 11:55
If I have a linked object, say a chair, and the seat is the root prim, then I put it in a box and script the box to rez the chair at <100,100,25> (which is right next to it) and run the script...

When I check the position of the rezed chair, it will be at <100,100,25>.

It's just that simple with llRezAtRoot()! :)
_____________________
~ Tiger Crossing
~ (Nonsanity)
Trent Hedges
TrentCycle & GRAPHICA
Join date: 4 Sep 2003
Posts: 198
11-09-2004 12:29
From: Tiger Crossing
If I have a linked object, say a chair, and the seat is the root prim, then I put it in a box and script the box to rez the chair at <100,100,25> (which is right next to it) and run the script...

When I check the position of the rezed chair, it will be at <100,100,25>.

It's just that simple with llRezAtRoot()! :)


hmm - its still messed for me : I used this command :
llRezAtRoot("scene",home,<0,0,0>,ZERO_ROTATION,1);
(home is the object reporting with llGetPos();)

and the linked set came up in the wrong place - slightly shifted and rotated 217 degrees?
what am i doing wrong man? I am tearing my hair out :(
Trent Hedges
TrentCycle & GRAPHICA
Join date: 4 Sep 2003
Posts: 198
update....
11-09-2004 12:53
I delinked and re-linked the entire object, then tried again :

The rotation was fixed - but the object still rezzed off the desired spot, almost 5 meters off - maybe it's still not accurate? Large objects might be more noticable?

this is very noticeable - hehe - it's rezzing in totally the wrong place. Any suggestions will save me my fast-dissapearing hair :)

thanks so far Tiger - it's getting interesting at least!
Del Dayton
British Beer Guzzler
Join date: 12 Dec 2003
Posts: 157
11-10-2004 11:13
Yeah I tried llRezAtRoot myself and basically had no success. It doesn't seem even predictable, let alone correct... rotations end up all over the place for starters. I have an entire pub that rezzes and expands from a box and the only way I could do that was by using the old llRezObject method:

Position the linked set, write down the desired co-ordinates.

Put those co-ords into the llRezObject and see that it goes somewhere completely different.

Use a calculator to get the difference between the desired and actual co-ordinates.

Alter the script and compensate for the difference by adding it on.

Try not to have anything rotated if possible, but if you do, use this string: llEuler2Rot(<x,y,z>*DEG_TO_RAD) and use 360 rather than 0 (otherwise more weirdness happens)

It was extremely time-consuming doing this for each 'part' of the pub, but at least it was predictable... llRezAtRoot wasn't. At all.
_____________________