|
Stranded Thibaud
Registered User
Join date: 20 Jan 2007
Posts: 2
|
03-14-2008 12:53
I do have two prims linked together:
A is the root prim and rotates around its z-axis B is linked to it and runs in a circle.
B is repeatedly rezzing a prim C, which dies after a given period of time.
My problem is, that B rezzes C at the same position all the time, instead of rezzing it relatively to B.
Being a total scripting noob, my script is simple as can be:
{ llRezObject( "C", llGetPos()+ <0.5,0.0,0.0>, <0.0,0.0,0.0>, <0.0,0.0,0.0,1.0>, 0); llSleep(30);
llResetScript(); }
Any hint? Thanks in advance!
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
03-14-2008 14:41
If you are rotating your object using llTargetOmega(), and the object is non-physical, then the position of B will never change. There's also no way to tell what position it SHOULD be in at any given time; the position is actually going to be different on every user's screen. Once you get that resolved (make your object physical or use non-physical rotation with llSetRot() or something similar), if applicable, you might then consider also calculating the rezzed object's positional offset, rotation, and/or velocity relatively: rotation bRot = llGetRot(); vector pos = llGetPos()+BASE_REZ_OFFSET*bRot; vector vel = BASE_REZ_VELOCITY*bRot; rotation rot = BASE_REZ_ROTATION*bRot; llRezObject(OBJECT_NAME, pos, vel, rot, REZ_PARAMETER);
|
|
Stranded Thibaud
Registered User
Join date: 20 Jan 2007
Posts: 2
|
03-14-2008 20:33
Thanks a zillion! The code sounds totally greek to me, but hey, it works!
|