Gayngel

Child prim Omega by root axis

Oct 8th, 2020
1,371
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. float angle = 90; //change to whatever angle you need.
  2.  
  3. integer prim_number = 2; // change to whatever prim number you need to rotate
  4.  
  5. float spinrate = 1.0; // change spin rate
  6.  
  7. float gain = 1.0; // change gain
  8.  
  9. default
  10. {
  11.     state_entry()
  12.     {
  13.  
  14.         vector RootAxis = llRot2Euler( llGetRootRotation());
  15.  
  16.         angle = angle * DEG_TO_RAD;
  17.  
  18.         rotation rot = llAxisAngle2Rot(RootAxis, angle);
  19.  
  20.         vector euler = llRot2Euler(rot) * RAD_TO_DEG;
  21.  
  22.         llSetLinkPrimitiveParamsFast(prim_number,[PRIM_OMEGA,euler,spinrate,gain]);
  23.     }
  24. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×