Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //new
- vector getPosition(integer n) {
- if ( n < 0 ) n = ActualTrackLength - 1;
- integer pull = n*23;
- string packed_data = llGetSubString(TData, pull, pull+22);
- float x = (float) llGetSubString(packed_data, 0, 5)/100.0;
- float y = (float) llGetSubString(packed_data, 6, 11)/100.0;
- float z = (float) llGetSubString(packed_data, 12, 18)/100.0;
- vector pos = <x,y,z>;
- pos = pos*Scale*RootRot + RootPos;
- return pos;
- }
- //old
- vector getPosition(integer n) {
- if ( n < 0 ) n = ActualTrackLength - 1;
- rotation PackedRot = (rotation)llList2String(TrackData, n);
- vector pos = <PackedRot.x, PackedRot.y, PackedRot.z>;
- pos = pos*Scale*RootRot + RootPos;
- return pos;
- }
- //new
- rotation getRotation(integer n) {
- if ( n < 0 ) n = ActualTrackLength - 1;
- integer pull = n*23;
- string packed_data = llGetSubString(TData, pull, pull+22);
- float angle = (float) llGetSubString(packed_data, 19, 22);
- float radians = angle*DEG_TO_RAD;
- re
- //old
- rotation getRotation(integer n) {
- if ( n < 0 ) n = ActualTrackLength - 1;
- rotation PackedRot = (rotation)llList2String(TrackData, n);
- float radians = PackedRot.s*DEG_TO_RAD;
- return llEuler2Rot(<-radians,0,0>);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement