Jump to content
Lolita Erin

Find the Rotation of a Child Link

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

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

Recommended Posts

Hello, i have seach but no luck,

i need to be able to find in all the links prims the rotation, to fix it in case is move

if i have 80 prims linked and some of them the rotation has move i like to seach in all the links which are the one are move so i can fix it (maybe with same script will be great)

here is and example of 4 prims and one is move rotation, i need to be able to find using a script

https://gyazo.com/638f6598a614dd3d070e78b8ef613d7f

Thanks so much for any help

Share this post


Link to post
Share on other sites

here is an idea of what you might do?

list rot_list;

check_prims()
{     rot_list = []; 
      integer prims=llGetNumberOfPrims();  
      integer x;
      for(x = 1; x <= prims;++x)
      { key link_key = llGetLinkKey(x);       
        list temp = llGetLinkPrimitiveParams(x,[ PRIM_ROT_LOCAL ]  ); 
        rotation r = llList2Rot( temp,0); 
        rot_list += link_key;
        rot_list += r;
      }  
}
compare_lists();
{ // make a function to compare list elements, and return TRUE or FALSE
}
reset_rotations()
{ // make a function to reset all rotations
}
list start_rotations;
list chk_rotations;

default
{
    state_entry()
    {  check_prims();
       start_rotations = rot_list;
      
    }
    touch_start(integer total_number)
    {   check_prims();
        chk_rotations = rot_list;
        integer status = compare_lists();
       
      if( status )
        llOwnerSay("rotations correct");
      else
       reset_rotations();
    }
}

 

  • Like 1

Share this post


Link to post
Share on other sites

The check_prims() return this and not in Degres how can i conver this?

thanks

Hello, Avatar!
[18:46] Object: Link # 1 Rotation: <0.00000, 0.00000, 0.00000, 1.00000>
[18:46] Object: Link # 2 Rotation: <0.00000, 0.00000, 0.00000, 1.00000>
[18:46] Object: Link # 3 Rotation: <0.00000, 0.00000, 0.33381, 0.94264>
[18:46] Object: Link # 4 Rotation: <0.00000, 0.00000, 0.00000, 1.00000>

 

Share this post


Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 1121 days.

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

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...