Jump to content

RLV and attaching


littlepinkpie
 Share

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

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

Recommended Posts

When you attach something from a shared folder using RLV, the viewer takes the attachment point from the name of the object (or the folder it's in, if it's a no mod object).   See the RLV API.     So one way to do it would be to ensure there are two items in the folder, one for the right leg and one for the left leg, and have the script that issues the @attach command decide, at run-time, which one to use.   

Once it's attached, a script in the attachment can move it round using llSetPos and llSetLocalRot (or llSetLinkPrimitiveParamsFast or whatever) in the normal way, but I don't think there's any way to change the attachment point once it's worn. 

Link to comment
Share on other sites

As Innula said, the viewer uses the name of the object, or the folder it's in, to determine the attachment point. That being said, I would go with the folder method. That way, you can make a link to the item, and put it in different folders named for the attachment points you want to use. Then in a script inside the object, you want a script with a list of local rotations, and possibly local positions as well as the attachment point constants. On attach, you'll want to use llGetAttached, find that resulting point in your list, and have it apply the rotation and position from the list

Link to comment
Share on other sites

Ok I get it, need some copies of the same object for setting different points.
About setting the position and rotation, how can I manipulate them using the same script which does the attach? I mean how to tell "set the rotation of the object1", "set the rotation of the object 2" etc?

Link to comment
Share on other sites

4 minutes ago, littlepinkpie said:

Ok I get it, need some copies of the same object for setting different points.
About setting the position and rotation, how can I manipulate them using the same script which does the attach? I mean how to tell "set the rotation of the object1", "set the rotation of the object 2" etc?

The rotation would need to be done in a script in the attachment itself. If the object is copy-able, instead of using a script to handle the rotation, making a copy of the attachment and placing each one in the named folder. Then go through and attach, move/rotate it how you want, and detach. As long as it uses the same attachment point next time, it retains the same position and rotation

Link to comment
Share on other sites

On 16 December 2017 at 6:32 PM, Innula Zenovka said:

When you attach something from a shared folder using RLV, the viewer takes the attachment point from the name of the object (or the folder it's in, if it's a no mod object).

Just so you know...

There has been NO need to either rename objects to include the attachment point name on brackets at the end, or place 'no mod' objects in attachment point named sub folders for several years (5 or more?). The rlv api wiki is basically... Out of date.
 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2343 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...