Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rotation rot_xyzq;
- default
- {
- state_entry()
- {
- vector xyz_angles = <0,1.0,0>; // This is to define a 1 degree change
- vector angles_in_radians = xyz_angles*DEG_TO_RAD; // Change to Radians
- rot_xyzq = llEuler2Rot(angles_in_radians); // Change to a Rotation
- }
- touch_start(integer num_detected)
- {
- llSetLinkPrimitiveParamsFast(LINK_ROOT, [
- PRIM_COLOR, ALL_SIDES, <1.0, 0.0, 0.0>, 1.0]);
- llSetLinkPrimitiveParamsFast(2, [
- // PRIM_ROT_LOCAL, llList2Rot(llGetLinkPrimitiveParams(!!llGetLinkNumber(), [PRIM_ROT_LOCAL]), <70.0,0.0,0.0>),
- PRIM_COLOR, ALL_SIDES, <0.0, 1.0, 0.0>, 1.0]);
- llSetRot(llGetRot()*rot_xyzq/llGetRootRotation()/llGetRootRotation()); //Do the Rotation...
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement