Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Camera Camera_HUD  

Camera_HUD

Create the Object
To create the object use the following script. Just drop it onto/into a fresh prim. The resulting prim is quite small since it is designed to be a low impact HUD.

Category: Camera
By : Fred Gandt
Created: 2012-03-24 Edited: 2012-03-24
Worlds: Second Life

the Zip file

Download all files for Camera_HUD
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Camera_HUD_1.lsl
Get file # 2. Camera_HUD_2.lsl
1 //This work uses content from the Second Life® Wiki article http://wiki.secondlife.com/wiki/User:Fred_Gandt/Scripts/Continued_5. Copyright © 2007-2009 Linden Research, Inc. Licensed under the Creative Commons Attribution-Share Alike 3.0 License
2
3 // V1 //
4
5 default
6 {
8 {
9 llSetObjectName("CamHUD"); // You can change this after if you want.
10 llSetPrimitiveParams([7, <0.01, 0.05, 0.025>,
11 8, <1.0, 0.0, 0.0, 0.0>,
12 9, 0, 0, <0.125, 0.625, 0.0>, 0.1, <0.0, 0.0, 0.0>, <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>,
13 17, -1, "5748decc-f629-461c-9a36-a35a221fe21f", <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 0.0]);
14 llRemoveInventory(llGetScriptName()); // Done its job so self deletes.
15 }
16 }

Camera_HUD

CamHUD Script
Drop this script into the prim you just created. Wear the object as a HUD. If you do not see two distinct buttons separated by a black line, it is probably back to front or something.

Category: Camera
By : Fred Gandt
Created: 2012-03-24 Edited: 2012-03-24
Worlds: Second Life

1 /This work uses content from the Second Life® Wiki article http://wiki.secondlife.com/wiki/User:Fred_Gandt/Scripts/Continued_5. Copyright © 2007-2009 Linden Research, Inc. Licensed under the Creative Commons Attribution-Share Alike 3.0 License
2
3 // V1 //
4
5 integer perms;
6
7 integer track;
8
9 integer on;
10
11 vector red = <1.0,0.0,0.0>;
12
13 vector green = <0.0,1.0,0.0>;
14
15 SetCameraParams(integer o, integer t)
16 {
17 list focus = [];
19 if(t)
20 focus = [CAMERA_FOCUS, llGetPos()];
21 else
22 focus = [CAMERA_FOCUS_LOCKED, TRUE];
23 llSetCameraParams([CAMERA_ACTIVE, o, CAMERA_POSITION_LOCKED, TRUE] + focus);
24 }
25
26 default
27 {
28 on_rez(integer param)
29 {
31 }
33 {
36 }
38 {
40 {
41 perms = TRUE;
42 llSetText(" Track | Power", <1.0,1.0,1.0>, 1.0);
43 llSetLinkPrimitiveParamsFast(-1, [PRIM_COLOR, -1, <0.0,0.0,0.0>, 1.0,
44 PRIM_COLOR, 6, red, 1.0,
45 PRIM_COLOR, 7, red, 1.0]);
46 }
47 }
49 {
50 if(perms)
51 {
52 integer face;
53 vector color;
54 if((face = llDetectedTouchFace(0)) == 6)
55 {
56 SetCameraParams((on = (!on)), track);
57 if(on)
58 color = green;
59 else
60 color = red;
61 }
62 else if(face == 7)
63 {
64 SetCameraParams(on, (track = (!track)));
65 if(track)
66 color = green;
67 else
68 color = red;
69 }
70 llSetLinkPrimitiveParamsFast(-1, [PRIM_COLOR, face, color, 1.0]);
71 }
72 }
73 }

Back to the Best Free Tools in Second Life and OpenSim.