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
Look At LinkedPrim Look At  

LinkedPrim Look At

Lets you point a linked prim at an object

Category: Look At
By : Anonymous
Created: 2014-04-04 Edited: 2014-04-04
Worlds: Second Life

the Zip file

Download all files for LinkedPrim Look At
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Script.lsl
1 // If you want to use the LookAt function on a linked object...
2 // License CC BY-NC-SA 3.0.
3 // Original function by http://digigrids.free.fr/wiki/index.php?title=LlLookAt
4
5 LinkedLookAt( vector Target){
6 rotation rotvec = llRotBetween(<0,1,0>,llVecNorm((Target - llGetPos())));
7 rotation rotbet = rotvec/llGetRootRotation();
8 llSetRot(rotbet);
9 }
10
11 default
12 {
14 {
15 llSensorRepeat("", "", AGENT, 20.0, PI, 1.0);
16 }
17
18 sensor(integer total_number)
19 {
20 vector p = llDetectedPos(0);
21 LinkedLookAt(p);
22 }
23 }

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