Altier Verwood Posted May 21, 2022 Share Posted May 21, 2022 Hello again forum, I have another question I wasn't able to find an answer to, I'm writing a script that will in theory, slowly move a child link in a random direction then reset slowly back to the original position. but I have run into two problems, first is the movement is not slow it just snaps to the location and the second problem, is I can't get it to save the original position to move back to, instead it just keeps moving farther away. any help would be greatly appreciated. integer k; vector pos; rotation rot; vector opos; float ds = 1; //debris size SMALLER float rs = 2; //debris random size BIGGER default { state_entry() { llSetTimerEvent(2.0); opos= llGetPos(); } timer() { for(k=0;k<rs;++k) { llSleep(.1); pos = llGetLocalPos(); llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_POSITION, pos+<(llFrand(rs))-ds,(llFrand(rs))-ds,(llFrand(rs))-ds>*rot]); //llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_POSITION, opos*rot]); } for(k=0;k<rs;++k) { llSleep(.1); pos = llGetLocalPos(); llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_POSITION, opos*rot]); } } } Link to comment Share on other sites More sharing options...
Quistess Alpha Posted May 22, 2022 Share Posted May 22, 2022 unfortunately your first problem isn't (easily/efficiently) solvable with LSL. you can't make a child prim move smoothly, you can only spin it smoothly with omega. as for the second, you should be able to figure it out if you think through your logic enough 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now