Jump to content
SweetheartLara

AttachtoAvatar issue?

Recommended Posts

Hi. 

So I managed to get a bucket on the wall to rez a another bucket to attach to avatar, everything works but the positioning.

When I touch the bucket rezzed, llRequestPermission dialog pops up, once accepted the rezzed object attaches to the avatar but doesn't attach correctly.

It would be on the correct attachment point (left forearm) but the rotation won't change no matter how many tests or adjustments I run.

Not sure quite what to do.

Edited by SweetheartLara

Share this post


Link to post
Share on other sites

The object should always attach with the same local position and local rotation (relative to the attachment point) that it had the last time it was saved.  So, you attach a copy of the object manually to your forearm, adjust it appropriately, and then take it to your inventory.  Use that copy in your rezzer.  When it's rezzed and attached with either llAttachToAvatar or llAttachToAvatarTemp, it should have the proper orientation.

Yes, you could also script llSetLinkPrimitiveParamsFast statements in the object itself to adjust the object as it attaches, but that's more work for you.

 

  • Like 1

Share this post


Link to post
Share on other sites

@Rolig Loon I have been doing. The multiple tests I've been running is to attach the object from my inventory and adjust to almost-perfection, including the rotation. I set it into the rezzer, and when I rez it, touch the object to attach and the same results. I have two scripts in the object, which is a Pose to play a specific animation and the request permissions to attach. Would it help to paste the scripts here?

Share this post


Link to post
Share on other sites

It couldn't hurt, if they aren't super long They are two separate scripts, not just a single one?

Actually, the animation script shouldn't have anything to do with attaching, so just the attachment script should be enough.

Share this post


Link to post
Share on other sites

I just realized what I did wrong. On the llRequestPermissions script, it was set to left hand and not left lower arm. Omg... Thank you for your help Rolig

  • Like 1

Share this post


Link to post
Share on other sites

Heh.  I do that sort of thing all the time.  The most frustrating scripting errors are the ones that have nothing to do with scripting at all.  🙄

  • Like 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×