Jump to content
Wandering Soulstar

Question on llSetLinkPrimitiveParamsFast in regards to moving prims

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

 

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Thanks to both! Rolig for clarifying the way it would act .. and Jasdac for the PRIM_LINK_TARGET suggestion. That may make the coding simpler as I move the panels. That way in a single call I can reposition, for example, two of the child prims!

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...