|
Jezania Zeid
Registered User
Join date: 11 Apr 2008
Posts: 6
|
06-28-2008 13:18
Okay I have an object that rezzes another using
llRezAtRoot(message, llGetPos()+<0,-.112,1.142>,ZERO_VECTOR,llGetRot()+<-25,0,0,1.0>,0);
it works great as long as I don't move the rezzer object after I initially place it.
If I rotate the rezzer the rezzed object no longer lines up.
any help ?
|
|
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
|
06-28-2008 13:43
2. and 4. parameters determine the objects position and rotation. Your 2. parameter could be right but the 4. is invalid. You can not add quaternions the way you do and the parts in quaternions range from -1 to 1; See http://www.lslwiki.net/lslwiki/wakka.php?wakka=rotation for more
_____________________
From Studio Dora
|
|
Zozo Plympton
Registered User
Join date: 26 Oct 2006
Posts: 26
|
06-28-2008 19:52
Oh well.. it doesn't line up because parameter 2 is not valid. According to your code parameter 2 is: llGetPos()+<0,-.112,1.142> This means that new object will be displaced FROM THE REZER OBJECT -.112 along Y and 1.142 along Z - NO MATTER HOW THE REZER OBJECT IS ROTATED. To make it align in this parameter you have to consider that that the rezer object may have been rotated and this is pretty simple. First you have to rotate manually the rezer object to ZERO_ROTATION. Then find out where do you want to rez the new object when the main object is NOT Rotated. Then parameter 2 should be: llGetPos() + <x,y,z> * llGetRot(). where x,y,z is the displacement of the rezed object when the base object is in zero rotation. That will align the position of the rezed object properly... you may also have to work on the rotation a bit but unfortunately I don't know that from the top of my head and right now I cannog get online  Have fun.
|