Jump to content

Question on llSetLinkPrimitiveParamsFast in regards to moving prims


Wandering Soulstar
 Share

You are about to reply to a thread that has been inactive for 1988 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi All,

Am working on a script for a specific set of patio doors that I have on my new house, and have some questions about how this would actually work in-world. I am not able to go inworld for some time but do have time to code, and so was hoping to get some things clear before I spent a whole lot of time pecking away at the key board.

What I have is a four panel door, that can open a varying number of the panels, and when fully open the panels slide into the wall. When they move, the distance is small steps to show the slide. All four panels are linked, the root prim is the panel that is next to the wall, and the one that has the control script.

Now to move the initial three panels, clear on how it would work, using  llSetLinkPrimitiveParamsFast passing the link and setting the position relative to the root. My question comes when the first three panels are at the root's position and I want to move all four 'into' the wall. Is there a way that I can just send a command to the root prim to do it's stepped move, and being the root, drag along the other child prims (without using llSetPos an incuring the 0.2 sec delay) or do I need to send a move to the root and then to the child prims to move again to align at the root? if the later is the case, would the following single call work to move all of the children: llSetLinkPrimitiveParamsFast(LINK_ALL_CHILDREN, [PRIM_POS_LOCAL, <0.0, 0.0, 0.0>])?

 

Thanks in advance!

Wanda

 

Link to comment
Share on other sites

If you move the root, the entire linkset will move along with it. That's often an annoyance, because we'd expect to be able to move the root alone, just as we move child prims.  In your case, though, you actually want to move everything, so just move the root --- PRIM_POSITION, llGetPos() + <1.0,0.0,0.0> * llGetRot()

  • Like 2
Link to comment
Share on other sites

Is the root prim one of the moving panels?

I'm not sure how helpful it is, but you can affect multiple prims in a single call using PRIM_LINK_TARGET, for an example:

llSetLinkPrimitiveParamsFast(LINK_ALL_CHILDREN, [
    PRIM_POSITION, <0,0,0>,				// Set the child prims to the root prim's position 
    PRIM_LINK_TARGET, LINK_ROOT,		// From here on, affect the root prim
    PRIM_POSITION, llGetPos()+<1,0,0>	// Set the whole linkset to +1m on X from its current position
])

 

  • Like 2
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1988 days.

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
 Share

×
×
  • Create New...