innula

Untitled

Aug 21st, 2012
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rotation rLin(rotation x, rotation y, float t) {
  2.     float ang = llAngleBetween(x, y);
  3.     if(ang > PI) ang -= TWO_PI;
  4.     return x * llAxisAngle2Rot(llRot2Axis(y/x)*x, ang*t);
  5. }
  6. // Released into public domain. By Nexii Malthus.
  7. default
  8. {
  9.     state_entry()
  10.     {
  11.         rotation x = llRot2Euler(<0,0,30*DEG_TO_RAD>);
  12. rotation y = llRot2Euler(<0,0,90*DEG_TO_RAD>);
  13. rotation z = rLin(x, y, 0.5); // z equivalent to euler rotation of 60 degrees on Z axis
  14.     }
  15.  
  16.     touch_start(integer total_number)
  17.     {
  18.         llSay(0, "Touched.");
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment