Skip to content

Instantly share code, notes, and snippets.

@migrs
Created July 28, 2008 10:34
Show Gist options
  • Save migrs/2870 to your computer and use it in GitHub Desktop.
Save migrs/2870 to your computer and use it in GitHub Desktop.
default
{
state_entry()
{
vector fwd = <llSqrt(2)/2, llSqrt(2)/2, 0.0>;
vector left = < 0.0, 1.0, 0.0>;
vector up = < 0.0, 0.0, 1.0>;
rotation rot = llAxes2Rot(fwd, up % fwd, up);
llSay(DEBUG_CHANNEL, (string) rot);
llSay(DEBUG_CHANNEL, (string) (llRot2Euler(rot) * RAD_TO_DEG));
rotation rotb = llAxisAngle2Rot(<0,0,1>, 45 * DEG_TO_RAD);
llSay(DEBUG_CHANNEL, (string) (llRot2Euler(rotb) * RAD_TO_DEG));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment