Jump to content

Find the Rotation of a Child Link


Lolita Erin
 Share

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

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

 

Link to comment
Share on other sites

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