Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

rezzing object relative alignment.

Diesel Tzedek
Registered User
Join date: 11 Sep 2006
Posts: 19
11-24-2006 07:17
im having a problem getting one object to rez another object above it in the correct position.
if the first object is at zero rotation the rezzed object is correctly aligned, but if it is rotated in any direction the rezzed object always appears 0.5m less in the x direction ( x if it was at zero rotation).
it does appear correct in the y and z axis and in rotaion.

i have tried adding another transparent prim to the rezzed object so that both objects have the same x,y,z location when they are aligned,
I cant figure out where Im going wrong
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
11-24-2006 07:48
You neet to rotate the offset.
Multiply offset by llGetRot()

CODE

vector offset = < 1,1,0>;
vector speed = <5,0,0>;
rotation rot = llGetRot();
integer number = 0;
llRezObject("object", llGetPos() + offset*rot,speed*rot,rot,number);
Diesel Tzedek
Registered User
Join date: 11 Sep 2006
Posts: 19
11-24-2006 10:25
Thanks