Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rotation NormRot(rotation Q){
- float MagQ = llSqrt(Q.x*Q.x + Q.y*Q.y +Q.z*Q.z + Q.s*Q.s);
- Q.x = Q.x/MagQ;
- Q.y = Q.y/MagQ;
- Q.z = Q.z/MagQ;
- Q.s = Q.s/MagQ;
- return Q;
- }
- rotation rot = <0.00000, 0.00000, -0.45399, 0.89101>;
- default
- {
- state_entry()
- {
- llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_PHYSICS_SHAPE_TYPE, PRIM_PHYSICS_SHAPE_CONVEX]);
- }
- touch_start(integer total_number)
- {
- //
- // Error: delta rotation at frame 0 contains a NaN, Inf, or is not a normalized rotation.
- //
- // llSetKeyframedMotion( [<3.57939, 0.00000, 0.00000>,
- // rot,
- // 3],
- // [ KFM_MODE, KFM_FORWARD ]);
- rotation normalized = NormRot(rot);
- llOwnerSay((string)normalized);
- llSetKeyframedMotion( [<3.57939, 0.00000, 0.00000>,
- normalized,
- 3.579391],
- [ KFM_MODE, KFM_FORWARD ]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement