Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

rezzing objects based on an object's rotation.

Ante Flan
'yote
Join date: 14 Sep 2005
Posts: 46
03-10-2007 09:58
Hey, I'm not much of a scripter, so I need some help.

I'm working on something, and so far, I've been able to figure things out ok. I have the script rezzing objects inside in a random position inside of itself using it's size and random numbers and such, but only if all of the axises line up. If it rotates, they still rez in the same position. I've been trying to figure out how to rez objects inside of that object even if it is rotated and such, but I'm not much of a scripter, so I haven't had much luck. I figure somebody here will know how to do it. I guess it would be called rezzing it at a local position. Again, I'm not much of a scripter. That's why I'm asking here. :P

Thanks in advance to anyone who replies.
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
03-10-2007 14:19
From: Ante Flan
Hey, I'm not much of a scripter, so I need some help.

I'm working on something, and so far, I've been able to figure things out ok. I have the script rezzing objects inside in a random position inside of itself using it's size and random numbers and such, but only if all of the axises line up. If it rotates, they still rez in the same position. I've been trying to figure out how to rez objects inside of that object even if it is rotated and such, but I'm not much of a scripter, so I haven't had much luck. I figure somebody here will know how to do it. I guess it would be called rezzing it at a local position. Again, I'm not much of a scripter. That's why I'm asking here. :P

Thanks in advance to anyone who replies.


To take into account the objects rotation you multiply the positional offset by the object rotation. i.e.

CODE

vector newpos = llGetPos() + (offset * llGetRot());
Ante Flan
'yote
Join date: 14 Sep 2005
Posts: 46
03-10-2007 18:07
Thanks a lot. I'll try to see if I can get that working.