Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Object rezzing position

Caesar Hawks
Registered User
Join date: 21 Jun 2007
Posts: 6
07-09-2007 16:00
Hi all,

I have an issue about rezzing.

I want to create a sort of 'smart board' which listens to avatars chat and show the heard words by rezzing the letter objects which compose it. To do this, I created a 'Rezzer' object which rezzes the 'NewRezzedLetter' object :

integer num = llStringLength(messages);

for ( i= 0; i < num ; i+=1 ) {
llRezObject("NewRezzedLetter", llGetPos()+<3, 0, z_coord>, ZERO_VECTOR,
ZERO_ROTATION, 1);
}

Tho script works correctly, but when I rotate the rezzing object, the rezzed objects don't follow the rotation of the 'father' object, being rezzed always at the same (not rotated) position.

How can I modify this piece of code in order to rez the objects with the rotation inherited by the father (rezzing) object?


thank you all

Caesar
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
07-09-2007 19:00
Both the rezzed objects and their offsets from the rezzing object need to be rotated in accordance with the rezzing object's own rotation. So, something like the following should work:

llRezObject("NewRezzedLetter", llGetPos()+(llGetRot() * <3, 0, z_coord>;), ZERO_VECTOR, llGetRot(), 1);

(Might save a few instructions by using a local variable to store llGetRot()'s value instead of calling the function twice here.)