View difference between Paste ID: EJZChzKP and AAU5BzvZ
SHOW: | | - or go back to the newest paste.
1
float angle = 90; //change to whatever angle you need.
2-
2+
3-
integer prim_number = 1; // change to whatever prim number you need to rotate
3+
integer prim_number = 2; // change to whatever prim number you need to rotate
4-
4+
5
float spinrate = 1.0; // change spin rate
6-
6+
7-
float gain = 1.0 // change gain
7+
float gain = 1.0; // change gain
8-
8+
9
default
10
{
11-
	state_entry()
11+
    state_entry()
12-
	{
12+
    {
13-
13+
14-
		Vector RootAxis = llRot2Euler( llGetRootRotation());
14+
        vector RootAxis = llRot2Euler( llGetRootRotation());
15-
15+
16-
		angle = angle * DEG_TO_RAD;
16+
        angle = angle * DEG_TO_RAD;
17-
17+
18-
		rotation rot = llAxisAngle2Rot(RootAxis, angle);
18+
        rotation rot = llAxisAngle2Rot(RootAxis, angle);
19
 
20-
		vector euler = llRot2Euler(rot) * RAD_TO_DEG;
20+
        vector euler = llRot2Euler(rot) * RAD_TO_DEG;
21-
21+
22-
		llSetLinkPrimitiveParamsFast(prim_number,[euler,spinrate,gain]);
22+
        llSetLinkPrimitiveParamsFast(prim_number,[PRIM_OMEGA,euler,spinrate,gain]);
23-
	}
23+
    }
24
}