<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ralph+Doctorow</id>
	<title>Second Life Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ralph+Doctorow"/>
	<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/wiki/Special:Contributions/Ralph_Doctorow"/>
	<updated>2026-06-21T17:59:39Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSetTextureAnim&amp;diff=178443</id>
		<title>LlSetTextureAnim</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSetTextureAnim&amp;diff=178443"/>
		<updated>2008-12-17T18:29:51Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: What is a frame, no repeats or rotations&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function/negative index|true|start}}{{#vardefine:spec|}}{{LSL_Function/face|face}}{{LSL_Function&lt;br /&gt;
|func_id=211&lt;br /&gt;
|func_sleep=0.0&lt;br /&gt;
|func_energy=10.0&lt;br /&gt;
|sort=SetTextureAnim&lt;br /&gt;
|func=llSetTextureAnim&lt;br /&gt;
|p1_type=integer|p1_name=mode|p1_desc=mask of Mode flags&lt;br /&gt;
|p2_type=integer|p2_name=face&lt;br /&gt;
|p3_type=integer|p3_name=sizex|p3_desc=horizontal frames (ignored for [[ROTATE]] and [[SCALE]])&lt;br /&gt;
|p4_type=integer|p4_name=sizey|p4_desc=vertical frames (ignored for [[ROTATE]] and [[SCALE]])&lt;br /&gt;
|p5_type=float|p5_name=start|p5_desc=Start position/frame number (or radians for [[ROTATE]])&lt;br /&gt;
|p6_type=float|p6_name=length|p6_desc=number of frames to display (or radians for [[ROTATE]])&lt;br /&gt;
|p7_type=float|p7_name=rate|p7_desc=frames per second (must not be zero)&lt;br /&gt;
|func_footnote=Frames are numbered from left to right, top to bottom, starting at 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Frames&#039;&#039;&#039; are sub-rectangles within the texture. A set of frames with 2 horizontal and 3 vertical means the overall texture is divided into 3 rows of 2 columns of images, each of which is a frame. llSetTextureAnim will animate across these 6 starting with the top left image and going across and down, optionally repeating. If [[SMOOTH]] is set the frames slide smoothly from one to the next, if off, each frame is displayed in turn centered on the face.&lt;br /&gt;
&amp;lt;br/&amp;gt;If &#039;&#039;&#039;rate&#039;&#039;&#039; is negative, has the same effect as using the [[REVERSE]] flag.&lt;br /&gt;
|func_desc=Animate the texture on the specified face/faces by setting the texture scale and offset.&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=*You can only have one texture animation on a prim&lt;br /&gt;
**Calling llSetTextureAnim more than once on a prim will reset it.&lt;br /&gt;
*You cannot combine ROTATE and SCALE&lt;br /&gt;
*&#039;&#039;&#039;sizex&#039;&#039;&#039; &amp;amp; &#039;&#039;&#039;sizey&#039;&#039;&#039; are both limited to a range of 0 to 255&lt;br /&gt;
*llSetTextureAnim when on shows the texture with 1 repeat in X and Y and 0 rotation and offset.&lt;br /&gt;
|constants={{{!}} class=&amp;quot;sortable collapsible&amp;quot; {{Prettytable|style=margin-top:0;}}&lt;br /&gt;
{{!}}-{{Hl2}}&lt;br /&gt;
! Modes&lt;br /&gt;
! title=&amp;quot;Value&amp;quot; {{!}}&lt;br /&gt;
! class=&amp;quot;unsortable&amp;quot; {{!}} Description&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}[[ANIM_ON]]&lt;br /&gt;
{{!}}{{LSL Hex||1|chars=2}}&lt;br /&gt;
{{!}}Texture animation is on. This must be set to start the animation, cleared to stop it.&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}[[LOOP]]&lt;br /&gt;
{{!}}{{LSL Hex||2|chars=2}}&lt;br /&gt;
{{!}}Loop the texture animation.&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}[[REVERSE]]&lt;br /&gt;
{{!}}{{LSL Hex||4|chars=2}}&lt;br /&gt;
{{!}}Play animation in reverse direction.&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}[[PING_PONG]]&lt;br /&gt;
{{!}}{{LSL Hex||8|chars=2}}&lt;br /&gt;
{{!}}Play animation going forwards, then backwards.&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}[[SMOOTH]]&lt;br /&gt;
{{!}}{{LSL Hex||16|chars=2}}&lt;br /&gt;
{{!}}Slide in the X direction, instead of playing separate frames.&amp;lt;br/&amp;gt;In both [[SCALE]] and [[ROTATE]] modes, causes smooth transitions.&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}[[ROTATE]]&lt;br /&gt;
{{!}}{{LSL Hex||32|chars=2}}&lt;br /&gt;
{{!}}Animate texture rotation.&amp;lt;br&amp;gt;Does not work with [[SCALE]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}[[SCALE]]&lt;br /&gt;
{{!}}{{LSL Hex||64|chars=2}}&lt;br /&gt;
{{!}}Animate the texture scale.&amp;lt;br&amp;gt;Does not work with [[ROTATE]]&lt;br /&gt;
{{!}}}&lt;br /&gt;
|examples=&lt;br /&gt;
This slides a texture smoothly and loops it when it gets to the end.&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetTextureAnim(ANIM_ON | SMOOTH | LOOP , ALL_SIDES, 1, 1, 1, 1, 1);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This slides a texture smoothly in the opposite direction&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetTextureAnim(ANIM_ON | SMOOTH | LOOP , ALL_SIDES, 1, 1, 1, 1, -1);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This divides a texture into 64 &amp;quot;cells&amp;quot;, 8 across, and 8 down, and flips through them, left to right, top to bottom. This is useful for cell animation.&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetTextureAnim( ANIM_ON | LOOP, ALL_SIDES, 8, 8, 0, 64, 6.4 );&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This rotates a texture counter-clockwise at 2 revolutions per second. Change the last value to -2*TWO_PI to rotate clockwise.&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetTextureAnim(ANIM_ON | SMOOTH | ROTATE | LOOP, ALL_SIDES,1,1,0, TWO_PI, 2*TWO_PI);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This scales a texture larger and smaller.&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetTextureAnim(ANIM_ON | SMOOTH | SCALE | PING_PONG | LOOP, ALL_SIDES, 1, 1, 1, 3, 2);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This turns off all texture animations&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetTextureAnim(FALSE, ALL_SIDES, 0, 0, 0.0, 0.0, 1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|permission&lt;br /&gt;
|negative_index&lt;br /&gt;
|cat1=Media&lt;br /&gt;
|cat2=Effects&lt;br /&gt;
|cat3=Texture&lt;br /&gt;
|cat4=Video&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Rotation&amp;diff=167253</id>
		<title>Rotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Rotation&amp;diff=167253"/>
		<updated>2008-12-08T04:47:05Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: Link to rotation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header|ml=*}}{{RightToc}}&lt;br /&gt;
=Rotations=&lt;br /&gt;
The LSL &#039;&#039;&#039;rotation&#039;&#039;&#039; type is one of several ways to represent an orientation in 3D.  (Note that we try to write the type name in &#039;&#039;&#039;bold&#039;&#039;&#039;.)&lt;br /&gt;
It is  a mathematical object called a {{LSLG|quaternion}}.  You can think of a quaternion as four numbers, three of which represent the direction an object is facing and a fourth that represents the object&#039;s banking left or right around that direction. The main advantage of using &lt;br /&gt;
quaternions is that they are not susceptible to [http://en.wikipedia.org/wiki/Gimbal_Lock gimbal lock]. &lt;br /&gt;
For the complex inner workings of quaternion mathematics, see {{LSLG|quaternion}}. &lt;br /&gt;
For a list of functions and events related to rotations see {{LSLG|LSL Rotation Synopsis}}.&lt;br /&gt;
There is also information about causing  textures to rotate in {{LSLG|texture}}s.&lt;br /&gt;
&lt;br /&gt;
==Other representations==&lt;br /&gt;
Another way to represent a 3D angle is using three numbers, &amp;lt;X, Y, Z&amp;gt;, which represent the amount  which the object is rotated around each axis.  This is used in the Edit window, for example, and is generally easy for people to visualize.  It is easy to adjust the Rotation &amp;lt;x, y, z&amp;gt; numbers in the Edit window and see how the object behaves.  Note that in the Edit window, the numbers are in degrees, that is, a right angle is 90.&lt;br /&gt;
&lt;br /&gt;
In LSL, these three angles are expressed in [[radians]] instead of degrees, that is, a right angle is PI/2.  (A radian is sort of a very fat degree.)&lt;br /&gt;
Note that these three numbers are a &#039;&#039;&#039;vector&#039;&#039;&#039; type and not a &#039;&#039;&#039;rotation&#039;&#039;&#039; type, though it can represent the same information.  This is called the &#039;&#039;Euler&#039;&#039; representation of a 3D angle.  In LSL the rotation around z is done first, then around y, and finally around x.&lt;br /&gt;
  &lt;br /&gt;
Another way to represent the same 3D angle is to use three vectors, showing what the front is pointing at, what the top is pointing at, and what the left side is pointing at.  Actually, only two of the three are needed, because any two determines the third.  &lt;br /&gt;
&lt;br /&gt;
For good reasons, such as being able to easily combine rotations, the four number version, the &#039;&#039;&#039;rotation&#039;&#039;&#039;, is better, though perhaps harder for a beginner to grasp. Fortunately it&#039;s very seldom necessary to do anything with the actual internal representation of &#039;&#039;rotations&#039;&#039; and there are functions for converting easily back and forth between the three LSL types, and between degrees and radians.&lt;br /&gt;
&lt;br /&gt;
==Right hand rule==&lt;br /&gt;
In LSL all rotations are done according to the &#039;&#039;&#039;right hand rule&#039;&#039;&#039;. With your right hand, extend the first finger in the direction of the positive direction of the x-axis. Extend your second finger at right angles to your first finger, it will point along the positive y-axis, and your thumb, extended at right angles to both will point along the positive z-axis. When you&#039;re editing an object, the three colored axis arrows point in the positive direction for each axis (X: red, Y: green, Z: blue).&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Right_hand_rule&lt;br /&gt;
&lt;br /&gt;
Now, don&#039;t remove your right hand just yet, there is another use for it, determining the direction of a positive rotation. Make a fist with your right hand, thumb extended and pointing in the positive direction of the axis you are interested in. Your fingers curl around in the direction of positive rotation. Rotations around the X, Y, and Z axis are often referred to as Roll, Pitch, and Yaw, particularly for vehicles.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Tait-Bryan_angles Roll Pitch Yaw]&lt;br /&gt;
&lt;br /&gt;
== Combining Rotations ==&lt;br /&gt;
&lt;br /&gt;
To combine &#039;&#039;&#039;rotations&#039;&#039;&#039;, you use the &#039;&#039;&#039;multiply&#039;&#039;&#039; and &#039;&#039;&#039;divide&#039;&#039;&#039; operators. Don&#039;t try to use addition or subtraction operators on &#039;&#039;&#039;rotations&#039;&#039;&#039;, as they will not do what you expect. The &#039;&#039;&#039;multiply&#039;&#039;&#039; operation applies the rotation in the positive direction, the &#039;&#039;&#039;divide&#039;&#039;&#039; operation does a negative rotation. You can also negate a rotation directly, just negate the s component, e.g. X.s = -X.s.&lt;br /&gt;
&lt;br /&gt;
Unlike other types such as {{LSLG|float}}, the order in which the operations are done, &lt;br /&gt;
[http://en.wikipedia.org/wiki/Commutative non-commutative], is important.&lt;br /&gt;
The reason for this is simple: the order you do rotations in is important in RL. For example, if you had a dart with four feathers, started from rotation &amp;lt;0, 0, 0&amp;gt; with its tail on the origin, it would lie on the X axis with its point aimed in the positive X direction, its feathers along the Z and Y axes, and the axes of the dart and the axes of the world would be aligned. We&#039;re going to rotate it 45 degrees around X and 30 degrees around Y, but in different orders.&lt;br /&gt;
&lt;br /&gt;
First, after rotating 45 deg around X the dart would still be on the X axis, unmoved, just turned along its long axis, so the feathers would be at 45 deg to the axes. Then rotating 30 deg around Y would move it in the XZ plane to point down 30 deg from the X axis (remember the right hand rule for rotations means a small positive rotation around Y moves the point down). The dart winds up pointing 30 deg down, in the same vertical plane it started in, but turned around its own long axis so the feathers are no longer up and down.&lt;br /&gt;
&lt;br /&gt;
If you did it the other way, first rotating 30 deg in Y, the dart would rotate down in the XZ plane, but notice that it no longer is on the X axis; its X axis and the world&#039;s aren&#039;t aligned any more. Now a 45 degree rotation around the X axis would pivot the dart around its tail, the point following a 30 deg cone whose axis is along the positive world X axis, for 45 degrees up and to the right. If you were looking down the X axis, it would pivot from pointing 30 deg below the X axis, up and to the right, out of the XZ plane, to a point below the 1st quadrant in the XY plane, its feathers rotating as it went.&lt;br /&gt;
&lt;br /&gt;
Clearly this is a different result from the first rotation, but the order of rotation is the only thing changed.&lt;br /&gt;
&lt;br /&gt;
To do a constant rotation you need to define a &#039;&#039;&#039;rotation&#039;&#039;&#039; value which can be done by creating a {{LSLG|vector}} with the X, Y, Z angles in radians as components (called an Euler angle), then converting that to a &#039;&#039;&#039;rotation&#039;&#039;&#039; by using the {{LSLG|llEuler2Rot}} function. You can alternately create the native rotation directly: the real part is the cosine of half the angle of rotation, and the vector part is the normalized axis of rotation multiplied by the sine of half the angle of rotation. To go from a rotation to an Euler angle {{LSLG|vector}} use {{LSLG|llRot2Euler}}.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; angles in LSL are in radians, not degrees, but you can easily convert by using the built-in constants [[#RAD_TO_DEG|RAD_TO_DEG]] and [[#DEG_TO_RAD|DEG_TO_RAD]]. For a 30 degree &#039;&#039;&#039;rotation&#039;&#039;&#039; around the X axis you might use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=0 cellspacing=0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |rotation rot30X&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |= [[llEuler2Rot]](&amp;lt;30, 0, 0&amp;gt; * [[DEG_TO_RAD]]);&lt;br /&gt;
||// convert the degrees to radians, then convert that [[vector]] into a rotation, rot30x&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |[[vector]] vec30X &lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |= [[llRot2Euler]](rot30X );&lt;br /&gt;
||// convert the rotation back to a [[vector]] (the values will be in radians)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Differences between math&#039;s quaternions and LSL rotations ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between LSL and maths that have little consequences while scripting, but that might puzzle people with prior mathematical knowledge. So we thought it would be good to list them here:&lt;br /&gt;
&lt;br /&gt;
* In LSL, all quaternions are normalized (the dot product of &#039;&#039;&#039;R&#039;&#039;&#039; by &#039;&#039;&#039;R&#039;&#039;&#039; is always &#039;&#039;&#039;1&#039;&#039;&#039;), and therefore represent ways to rotate objects without changing their size. In maths, generic quaternions might be not normalized, and they represent &#039;&#039;affinities&#039;&#039;, i.e. a way to rotate &#039;&#039;&#039;and&#039;&#039;&#039; change the size of objects.&lt;br /&gt;
* In LSL, the &#039;&#039;&#039;s&#039;&#039;&#039; term is the fourth member of the rotation: &#039;&#039;&#039;&amp;lt;x, y, z, s&amp;gt;&#039;&#039;&#039;. In maths, the &#039;&#039;&#039;s&#039;&#039;&#039; term, also called &amp;quot;real part&amp;quot;, is written as the first coordinate of the quaternion: &#039;&#039;&#039;(s, x, y, z)&#039;&#039;&#039;.&lt;br /&gt;
* Multiplication is written in reverse order in LSL and in maths. In LSL, you would write &#039;&#039;&#039;R * S&#039;&#039;&#039;, where in maths you would write &#039;&#039;&#039;S . R&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Order of rotation for Euler Vectors ==&lt;br /&gt;
&lt;br /&gt;
From the above discussion, it&#039;s clear that when dealing with rotations around more than one axis, the order they are done in is critical. In the &#039;&#039;Euler&#039;&#039; discussion above this was kind of glossed over a bit, the individual rotations around the three axis define an overall &#039;&#039;rotation&#039;&#039;, but that begs the question: What axis order are the rotations done in? The answer is &#039;&#039;&#039;Z, Y, X&#039;&#039;&#039; in global coordinates. If you are trying to rotate an object around more than one axis at a time using the &#039;&#039;Euler&#039;&#039; representation, determine the correct &#039;&#039;Euler&#039;&#039; {{LSLG|vector}} using the Z, Y, X rotation order, then use the {{LSLG|llEuler2Rot}} function to get the &#039;&#039;&#039;rotation&#039;&#039;&#039; for use in combining rotations or applying the rotation to the object.&lt;br /&gt;
&lt;br /&gt;
== Local vs Global (World) rotations ==&lt;br /&gt;
&lt;br /&gt;
It is important to distinguish between the &#039;&#039;&#039;rotation&#039;&#039;&#039; relative to the world, and the &#039;&#039;&#039;rotation&#039;&#039;&#039; relative to the local object itself.  In the editor, you can switch back and forth from one to the other.  In a script, you must convert from one to the other to get the desired behavior.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Local&#039;&#039;&#039; rotations are ones done around the axes embedded in the object itself forward/back, left/right, up/down, irrespective of how the object is rotated in the world. &#039;&#039;&#039;Global&#039;&#039;&#039; rotations are ones done around the world axes, North/South, East/West, Higher/Lower. You can see the difference by rotating a prim, then edit it and change the axes settings between local and global, notice how the colored axes arrows change.&lt;br /&gt;
&lt;br /&gt;
In LSL, the difference between doing a &#039;&#039;&#039;local&#039;&#039;&#039; or &#039;&#039;&#039;global&#039;&#039;&#039; rotation is the order the &#039;&#039;&#039;rotations&#039;&#039;&#039; are evaluated in the statement.&lt;br /&gt;
&lt;br /&gt;
This does a &#039;&#039;&#039;local&#039;&#039;&#039; 30 degree rotation by putting the constant 30 degree &#039;&#039;&#039;rotation&#039;&#039;&#039; to the left of the object&#039;s starting &#039;&#039;&#039;rotation&#039;&#039;&#039; (myRot). It is like the first operation in the first example above, just twisting the dart 30 degrees around its own long axis. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=0 cellspacing=0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |rotation localRot = &lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |rot30X * myRot;&lt;br /&gt;
||// do a local rotation by multiplying a constant rotation by a world rotation&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To do a &#039;&#039;&#039;global&#039;&#039;&#039; rotation, use the same &#039;&#039;&#039;rotation&#039;&#039;&#039; values, but in the opposite order. This is like the second operation in the second example, the dart rotating up and to the right around the world X axis. In this case, the existing rotation (myRot) is rotated 30 degrees around the global X axis.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=0 cellspacing=0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |rotation globalRot &lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; | = myRot * rot30X;&lt;br /&gt;
||// do a global rotation by multiplying a world rotation by a constant rotation&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Another way to think about combining rotations ==&lt;br /&gt;
&lt;br /&gt;
You may want to think about this &#039;&#039;&#039;local&#039;&#039;&#039; vs &#039;&#039;&#039;global&#039;&#039;&#039; difference by considering that &#039;&#039;&#039;rotations&#039;&#039;&#039; are done in evaluation order, that is left to right except for parenthesized expressions.&lt;br /&gt;
&lt;br /&gt;
In the localRot case, what happened was that starting from &amp;lt;0, 0, 0&amp;gt;, the rot30X was done first, rotating the prim around the world X axis, but since when it&#039;s unrotated, the local and global axes are identical it has the effect of doing the rotation around the object&#039;s local X axis. Then the second &#039;&#039;&#039;rotation&#039;&#039;&#039; myRot was done which rotated the prim to its original rotation, but now with the additional X axis rotation baked in. What this looks like is that the prim rotated in place, around its own X axis, with the Y and Z rotations unchanged, a &#039;&#039;&#039;local&#039;&#039;&#039; rotation.&lt;br /&gt;
&lt;br /&gt;
In the globalRot case, again starting from &amp;lt;0, 0, 0&amp;gt;, first the object is rotated to its original rotation (myRot), but now the object&#039;s axes and the world&#039;s axes are no longer aligned! So, the second &#039;&#039;&#039;rotation&#039;&#039;&#039; rot30x does exactly what it did in the local case, rotates the object 30 degrees around the world X axis, but the effect is to rotate the object through a cone around the world X axis since the object&#039;s X axis and the world&#039;s X axis aren&#039;t the same this time. What this looks like is that the prim pivoted 30 degrees around the world X axis, hence a &#039;&#039;&#039;global&#039;&#039;&#039; rotation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Division&#039;&#039;&#039; of &#039;&#039;&#039;rotations&#039;&#039;&#039; has the effect of doing the rotation in the opposite direction, multiplying by a 330 degree &#039;&#039;&#039;rotation&#039;&#039;&#039; is the same as dividing by a 30 degree &#039;&#039;&#039;rotation&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Using Rotations ==&lt;br /&gt;
&lt;br /&gt;
You can access the individual components of a &#039;&#039;&#039;rotation&#039;&#039;&#039; &#039;&#039;&#039;R&#039;&#039;&#039; by &#039;&#039;&#039;R.x, R.y, R.z, &amp;amp; R.s&#039;&#039;&#039; (&#039;&#039;&#039;not&#039;&#039;&#039; R.w).  The scalar part R.s is the cosine of half the angle of rotation.  The vector part (R.x,R.y,R.z) is the product of the normalized axis of rotation and the sine of half the angle of rotation.  You can generate an inverse &#039;&#039;&#039;rotation&#039;&#039;&#039; by negating the x,y,z members (or by making the s value negative). As an aside, you can also use a &#039;&#039;&#039;rotation&#039;&#039;&#039; just as a repository of [[float]] values, each &#039;&#039;&#039;rotation&#039;&#039;&#039; stores four of them and a [[list]] consisting of &#039;&#039;&#039;rotation&#039;&#039;&#039; is more efficient than a [[list]] consisting of [[float]]s, but there is overhead in unpacking them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=0 cellspacing=0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |rotation rot30X &lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |= [[llEuler2Rot]](&amp;lt;30, 0, 0&amp;gt; * [[#DEG_TO_RAD|DEG_TO_RAD]] );&lt;br /&gt;
||// Create a rotation constant&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |rotation rotCopy &lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |= rot30X;&lt;br /&gt;
||// Just copy it into rotCopy, it copies all 4 float components&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |float X &lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |= rotCopy.x;&lt;br /&gt;
||// Get out the individual components of the rotation&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |float Y &lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |= rotCopy.y;&lt;br /&gt;
||&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |float Z &lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |= rotCopy.z;&lt;br /&gt;
||&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |float S &lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |= rotCopy.s;&lt;br /&gt;
||&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |rotation anotherCopy &lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |= &amp;lt;X, Y, Z, S&amp;gt;;&lt;br /&gt;
||// Make another rotation out of the components&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There is a built in constant for a zero &#039;&#039;&#039;rotation&#039;&#039;&#039; [[#ZERO_ROTATION|ZERO_ROTATION]] which you can use directly or, if you need to invert a &#039;&#039;&#039;rotation R&#039;&#039;&#039;, divide [[#ZERO_ROTATION|ZERO_ROTATION]] by &#039;&#039;&#039;R&#039;&#039;&#039;. As a reminder from above, this works by first rotating to the zero position, then because it is a divide, rotating in the opposite sense to the original  &#039;&#039;&#039;rotation&#039;&#039;&#039;, thereby doing the inverse rotation.&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=0 cellspacing=0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |rotation rot330X &lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |= &amp;lt;-rot30X.x, -rot30X.y, -rot30X.z, rot30X.s&amp;gt;;&lt;br /&gt;
||// invert a rotation - NOTE the s component isn&#039;t negated&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |rotation another330X &lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |= [[#ZERO_ROTATION|ZERO_ROTATION]] / rot30X;&lt;br /&gt;
||// invert a rotation by  division, same result as rot330X&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |rotation yetanother330X &lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |= &amp;lt;rot30X.x, rot30X.y, rot30X.z, -rot30X.s&amp;gt;;&lt;br /&gt;
||// not literally the same but works the same.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Single or Root Prims vs Linked Prims vs Attachments ==&lt;br /&gt;
&lt;br /&gt;
The reason for talking about single or linked prim rotations is that for things like doors on vehicles, the desired motion is to move the door relative to the vehicle, no matter what the rotation of the overall vehicle is. While possible to do this with global rotations, it would quickly grow tedious.&lt;br /&gt;
There are generally three coordinate systems a prim can be in: all alone, part of a {{LSLG|linkset}}, or part of an {{LSLG|attachment}}. When a prim is alone, i.e., not part of a {{LSLG|linkset}}, it acts like a root prim; when it is part of an {{LSLG|attachment}}, it acts differently and is a bit broken.&lt;br /&gt;
&lt;br /&gt;
{{LSLRotGetSet}}&lt;br /&gt;
&lt;br /&gt;
==Rotating Vectors ==&lt;br /&gt;
&lt;br /&gt;
In LSL, rotating a [[vector]] is very useful if you want to move an object in an arc or circle when the center of rotation isn&#039;t the center of the object.&lt;br /&gt;
&lt;br /&gt;
This sounds very complex, but there is much less here than meets the eye. Remember from the above discussion of rotating the [[#Combining Rotations|dart]], and replace the physical dart with a [[vector]] whose origin is the tail of the dart, and whose components in X, Y, and Z describe the position of the tip of the dart. Rotating the dart around its tail moves the tip of the dart through and arc whose center of rotation is the tail of the dart. In exactly the same way, rotating a [[vector]] which represents an offset from the center of a prim rotates the prim through the same arc. What this looks like is the object rotates around a position offset by the [[vector]] from the center of the prim.&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=0 cellspacing=0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |rotation rot6X &lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |= [[llEuler2Rot]](&amp;lt;30, 0, 0&amp;gt; * [[#DEG_TO_RAD|DEG_TO_RAD]] );&lt;br /&gt;
||// create a rotation constant, 30 degrees around the [[Viewer_coordinate_frames#Local|local]] X axis&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |vector offset &lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |= &amp;lt;0, 1, 0&amp;gt;;&lt;br /&gt;
||// create an offset one meter in the [[Viewer_coordinate_frames#Local|local]] positive Y direction&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |vector rotatedOffset &lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |= offset * rot6X;&lt;br /&gt;
||// rotate the offset to get the motion caused by the rotations&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |vector newPos &lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |= [[llGetPos]]() + (offset - rotatedOffset) * [[llGetRot]]();&lt;br /&gt;
||// move the prim position by the rotated offset amount&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |rotation newRot&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |= rot6X * [[llGetRot]]();&lt;br /&gt;
||// change rot to continue facing offset point&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
//-- same as:&lt;br /&gt;
llSetPrimitiveParams( [PRIM_POSITION, llGetPos() + (gPosOffset - gPosOffset * gRotArc) * llGetRot(),&lt;br /&gt;
                       PRIM_ROTATION, gRotArc * llGetRot()] );&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Nota Bene:&#039;&#039;&#039; Doing this is a move, so don&#039;t forget about issues of moving a prim off world, below ground, more than 10 meters etc.&lt;br /&gt;
&lt;br /&gt;
To get a point relative to the objects current facing (such as used in rezzors)&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=0 cellspacing=0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |rotation rotFacing &lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |= [[llGetRot]]();&lt;br /&gt;
||// get the objects current rotation&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |vector offset &lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |= &amp;lt;0, 0, 1&amp;gt;;&lt;br /&gt;
||// create an offset one meter in the [[Viewer_coordinate_frames#Local|local]] positive Z direction&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |vector rotatedOffset &lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; | = offset * rotFacing;&lt;br /&gt;
||// rotate the offset to be relative to object rotation&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; |vector correctOffset &lt;br /&gt;
| style=&amp;quot;white-space: nowrap&amp;quot; | = [[llGetPos]]() + rotatedOffset;&lt;br /&gt;
||// get the [[Viewer_coordinate_frames#Region|region]] position of the local offset&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
//-- same as:&lt;br /&gt;
vector correctOffset = llGetPos() + offset * llGetRot();&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Useful Snippets==&lt;br /&gt;
&amp;lt;lsl&amp;gt;integer IsRotation(string s)&lt;br /&gt;
{&lt;br /&gt;
    list split = llParseString2List(s, [&amp;quot; &amp;quot;], [&amp;quot;&amp;lt;&amp;quot;, &amp;quot;&amp;gt;&amp;quot;, &amp;quot;,&amp;quot;]);&lt;br /&gt;
    if(llGetListLength(split) != 9)//we must check the list length, or the next test won&#039;t work properly.&lt;br /&gt;
        return 0;&lt;br /&gt;
    return !((string)((rotation)s) == (string)((rotation)((string)llListInsertList(split, [&amp;quot;-&amp;quot;], 7))));&lt;br /&gt;
    //it works by trying to flip the sign on the S element of the rotation,&lt;br /&gt;
    //if it works or breaks the rotation then the values won&#039;t match.&lt;br /&gt;
    //if the rotation was already broken then the sign flip will have no affect and the values will match&lt;br /&gt;
    //we cast back to string so we can catch negative zero which allows for support of &amp;lt;0,0,0,0&amp;gt;&lt;br /&gt;
}//Strife Onizuka&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
=== [[ZERO_ROTATION]] ===&lt;br /&gt;
ZERO_ROTATION = &amp;lt;0.0, 0.0, 0.0, 1.0&amp;gt;;&amp;lt;br/&amp;gt;&lt;br /&gt;
A rotation constant representing a Euler angle of &amp;lt;0.0, 0.0, 0.0&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== [[DEG_TO_RAD]] ===&lt;br /&gt;
DEG_TO_RAD = 0.01745329238f;&amp;lt;br/&amp;gt;&lt;br /&gt;
A float constant that when multiplied by an angle in degrees gives the angle in radians.&lt;br /&gt;
&lt;br /&gt;
=== [[RAD_TO_DEG]] ===&lt;br /&gt;
RAD_TO_DEG = 57.29578f;&amp;lt;br/&amp;gt;&lt;br /&gt;
A float constant when multiplied by an angle in radians gives the angle in degrees.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:LSL_Types|Rotation]][[Category:LSL_Math]][[Category:LSL_Math/3D]][[Category:LSL_Constants]][[Category:LSL Rotation]]&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlTargetOmega&amp;diff=163823</id>
		<title>LlTargetOmega</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlTargetOmega&amp;diff=163823"/>
		<updated>2008-12-04T04:02:34Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: Linked to Prim&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Function&lt;br /&gt;
|func_id=133&lt;br /&gt;
|func_sleep=0.0&lt;br /&gt;
|func_energy=10.0&lt;br /&gt;
|func=llTargetOmega&lt;br /&gt;
|p1_type=vector|p1_name=axis|p1_desc=arbitrary axis to rotate the object around&lt;br /&gt;
|p2_type=float|p2_name=spinrate|p2_desc=rate of rotation in radians per second&lt;br /&gt;
|p3_type=float|p3_name=gain|p3_desc=also modulates the final spinrate and disables the rotation behavior if zero&lt;br /&gt;
|func_footnote&lt;br /&gt;
|func_desc=Rotates the object around &#039;&#039;&#039;axis&#039;&#039;&#039; at &#039;&#039;&#039;spinrate&#039;&#039;&#039; * [[llVecMag]](&#039;&#039;&#039;axis&#039;&#039;&#039;) in radians per second with strength &#039;&#039;&#039;gain&#039;&#039;&#039;.&lt;br /&gt;
|examples=&amp;lt;lsl&amp;gt;//rotates the x axis once per second,&lt;br /&gt;
//  rotates the y axis 3 times per second, &lt;br /&gt;
//  rotates the z axis once every two seconds.&lt;br /&gt;
//  combined the rate is about 3.20156 revolutions per second&lt;br /&gt;
&lt;br /&gt;
llTargetOmega(&amp;lt;1.0,3.0,0.5&amp;gt;,TWO_PI,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|spec=&lt;br /&gt;
===Physics===&lt;br /&gt;
*If the object is not physical then the effect is entirely client side. The rotation experienced by the user &#039;&#039;&#039;cannot&#039;&#039;&#039; be detected or queried by script.&lt;br /&gt;
*If the object is physical then the physical representation is updated regularly. The rotation experienced by the user &#039;&#039;&#039;can&#039;&#039;&#039; be detected or queried by script.&lt;br /&gt;
===Link Sets===&lt;br /&gt;
*If the script is attached to the root prim, the entire object rotates around the [[Viewer coordinate frames#Region|region]] &#039;&#039;&#039;axis&#039;&#039;&#039;&lt;br /&gt;
**If the object is attached then it rotates around the attachment &#039;&#039;&#039;axis&#039;&#039;&#039;&lt;br /&gt;
*If the script is attached to a child prim, the prim rotates around the [[Viewer coordinate frames#Local|local]] &#039;&#039;&#039;axis&#039;&#039;&#039;&lt;br /&gt;
**A Child prim can rotate around its own &#039;&#039;&#039;axis&#039;&#039;&#039; while the entire object rotates around another &#039;&#039;&#039;axis&#039;&#039;&#039;.&lt;br /&gt;
|caveats=*If the object is not physical then the rotation is only a client side effect and it will collide as non-moving geometry.&lt;br /&gt;
|constants&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles&lt;br /&gt;
|also_tests={{LSL DefineRow||[[llTargetOmega test]]|}}&lt;br /&gt;
|notes=* Use [[llVecNorm]] on &#039;&#039;&#039;axis&#039;&#039;&#039; so that &#039;&#039;&#039;spinrate&#039;&#039;&#039; actually represents the rate of rotation.&lt;br /&gt;
* Set the gain to zero to disable and remove the rotation behavior, eg llTargetOmega(ZERO_VECTOR, 0, 0);&lt;br /&gt;
** A spinrate of 0 with a nonzero gain causes the object to try to stop all spin, rather than simply clearing a previous llTargetOmega() call.  &lt;br /&gt;
|cat1=Physics&lt;br /&gt;
|cat2=Effects&lt;br /&gt;
|cat3=Rotation&lt;br /&gt;
|cat4=Prim&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlGetRot&amp;diff=157663</id>
		<title>LlGetRot</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlGetRot&amp;diff=157663"/>
		<updated>2008-11-29T02:19:26Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: Linked to Prim&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func=llGetRot&lt;br /&gt;
|sort=GetRot&lt;br /&gt;
|func_id=62|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func_desc&lt;br /&gt;
|func_footnote&lt;br /&gt;
|return_type=rotation&lt;br /&gt;
|return_text=that is the prim&#039;s rotation relative to the [[Viewer coordinate frames#Region|region]] plane.&lt;br /&gt;
|constants&lt;br /&gt;
|spec&lt;br /&gt;
|caveats&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;lsl&amp;gt; //-- rotates an object to face the nearest cardinal direction (N,E,S,W)&lt;br /&gt;
 //-- assumes build is aligned to root object facing&lt;br /&gt;
&lt;br /&gt;
default{&lt;br /&gt;
  state_entry()&lt;br /&gt;
  {&lt;br /&gt;
    llSay( 0, &amp;quot;Rotate me in edit, then touch to make me face the nearest compass point&amp;quot; );&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  touch_start( integer vIntTouches )&lt;br /&gt;
  {&lt;br /&gt;
     //-- convert our rotation to x/y/z radians&lt;br /&gt;
    vector vRadBase = llRot2Euler( llGetRot() );&lt;br /&gt;
     //-- round the z-axis to the nearest 90deg (PI_BY_TWO = 90deg in radians)&lt;br /&gt;
    llSetRot( llEuler2Rot( &amp;lt;0.0, 0.0, llRound( vRadBase.z / PI_BY_TWO ) * PI_BY_TWO &amp;gt; ) );&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_header&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llGetLocalRot]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llGetRootRotation]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llGetPrimitiveParams]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llSetRot]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llSetLocalRot]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llSetPrimitiveParams]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llSetLinkPrimitiveParams]]|}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles&lt;br /&gt;
|also_footer&lt;br /&gt;
|notes=llGetRot in [[Mouselook]] (see [[llForceMouselook]]) for an attachment returns the angle the avatar is looking in.&lt;br /&gt;
The tooltip in the in-client editor is incorrect, it will work in scripts in objects that are physical.&lt;br /&gt;
|mode&lt;br /&gt;
|deprecated&lt;br /&gt;
|location&lt;br /&gt;
|cat1=Movement&lt;br /&gt;
|cat2=Rotation&lt;br /&gt;
|cat3=Prim&lt;br /&gt;
|cat4&lt;br /&gt;
|cat5&lt;br /&gt;
|cat6&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlGetRootRotation&amp;diff=157633</id>
		<title>LlGetRootRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlGetRootRotation&amp;diff=157633"/>
		<updated>2008-11-29T02:15:48Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: Linked to Prim&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=269|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llGetRootRotation|return_type=rotation&lt;br /&gt;
|func_footnote&lt;br /&gt;
|func_desc&lt;br /&gt;
|return_text=that is the [[Viewer coordinate frames#Region|region]] rotation of the root object of the prim the script is attached to.&lt;br /&gt;
|spec&lt;br /&gt;
|caveats&lt;br /&gt;
|constants&lt;br /&gt;
|examples&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llGetLocalRot]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llGetRot]]|}}&lt;br /&gt;
|also_events&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|permission&lt;br /&gt;
|negative_index&lt;br /&gt;
|cat1=Movement&lt;br /&gt;
|cat2=Rotation&lt;br /&gt;
|cat3=Prim&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlGetRootPosition&amp;diff=157583</id>
		<title>LlGetRootPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlGetRootPosition&amp;diff=157583"/>
		<updated>2008-11-29T01:42:33Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: Linked to Prim&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=268|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llGetRootPosition|return_type=vector&lt;br /&gt;
|func_footnote&lt;br /&gt;
|func_desc&lt;br /&gt;
|return_text=that is the [[Viewer coordinate frames#Region|region]] position of the root object of the object script is attached to&lt;br /&gt;
|spec&lt;br /&gt;
|caveats&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default{&lt;br /&gt;
  touch_start( integer vIntTouched ){&lt;br /&gt;
    string vStrMessage = &amp;quot;The prim with this scipt is &amp;quot;;&lt;br /&gt;
    if (llGetPos() != llGetRootPosition()){&lt;br /&gt;
      vStrMessage += &amp;quot;NOT &amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    llSay( PUBLIC_CHANNEL, vStrMessage + &amp;quot;centered on the root prim.&amp;quot; );&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers=&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
//-- there is no llSetLocalPos, this adds the functionality&lt;br /&gt;
//-- to match llGetLocalPos() in a child prim&lt;br /&gt;
fSetLocalPos( vector vPosOffset ){&lt;br /&gt;
  llSetPos( llGetRootPosition() + vPosOffset );&lt;br /&gt;
}&lt;br /&gt;
//-- this will move a root prim by the offset, or set the&lt;br /&gt;
//-- position of a child prim relative to the root.&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llGetLocalPos]]|Gets the child prims position relative to the root}}&lt;br /&gt;
{{LSL DefineRow||[[llGetPos]]|Gets the prims global position}}&lt;br /&gt;
{{LSL DefineRow||[[llSetPos]]|Sets the prims global position}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|cat1=Movement&lt;br /&gt;
|cat2=Prim&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSitTarget&amp;diff=157573</id>
		<title>LlSitTarget</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSitTarget&amp;diff=157573"/>
		<updated>2008-11-29T01:18:53Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=238|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|sort=SitTarget&lt;br /&gt;
|func=llSitTarget&lt;br /&gt;
|p1_type=vector|p1_name=offset|p1_desc=Additional position for the sit target in local prim coordinates.&lt;br /&gt;
|p2_type=rotation|p2_name=rot|p2_desc=Additional rotation for the sit target relative to the prim rotation.&lt;br /&gt;
|func_footnote=If &#039;&#039;&#039;offset&#039;&#039;&#039; == [[ZERO_VECTOR|{{LSL VR|0.0|0.0|0.0}}]] then the sit target is removed.&lt;br /&gt;
|func_desc=Set the sit location for the prim. The sit location is relative to the prim&#039;s position and rotation.&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=*Once a sit target is removed [[llAvatarOnSitTarget]] will only return {{LSL_Constant/NULL_KEY}}.&lt;br /&gt;
*There is no way to remove the Sit option from the pie menu.&lt;br /&gt;
**It will appear to be removed if the [[llSetSitText]] is set to a space &amp;quot;&amp;amp;nbsp;&amp;quot;.&lt;br /&gt;
*Attachments cannot be sat upon.&lt;br /&gt;
*Sit Target sets the position for the Agent Target, Advanced -&amp;gt; Character -&amp;gt; View Agent Target, and has a displacement that will require a bit of examination.&lt;br /&gt;
**llSetLinkPrimitiveParams seems to be the easy work-around.&lt;br /&gt;
**Animation is relative to the Agent Target, but the Agent Target isn&#039;t described by the animation.&lt;br /&gt;
*[[llSitTarget]] does not update position of an already seated avatar.&lt;br /&gt;
**[[#UpdateSitTarget|UpdateSitTarget]] described below works around this problem. It works by converting the sit target information into a link position that can be passed along to [[llSetLinkPrimitiveParams]]. &lt;br /&gt;
|constants&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSitTarget(&amp;lt;0.0, 0.0, 1.0&amp;gt;, ZERO_ROTATION); //The vector&#039;s components must not all be set to 0 for effect to take place.&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers= ===UpdateSitTarget===&lt;br /&gt;
&amp;lt;lsl&amp;gt;//Sets / Updates the sit target moving the avatar on it if necessary.&lt;br /&gt;
UpdateSitTarget(vector pos, rotation rot)&lt;br /&gt;
{//Using this while the object is moving may give unpredictable results.&lt;br /&gt;
    llSitTarget(pos, rot);//Set the sit target&lt;br /&gt;
    key user = llAvatarOnSitTarget();&lt;br /&gt;
    if(user)//true if there is a user seated on the sittarget, if so update their position&lt;br /&gt;
    {&lt;br /&gt;
        vector size = llGetAgentSize(user);&lt;br /&gt;
        if(size)//This tests to make sure the user really exists.&lt;br /&gt;
        {&lt;br /&gt;
            //We need to make the position and rotation local to the current prim&lt;br /&gt;
            rotation localrot = ZERO_ROTATION;&lt;br /&gt;
            vector localpos = ZERO_VECTOR;&lt;br /&gt;
            if(llGetLinkNumber() &amp;gt; 1)//only need the local rot if it&#039;s not the root.&lt;br /&gt;
            {&lt;br /&gt;
                localrot = llGetLocalRot();&lt;br /&gt;
                localpos = llGetLocalPos();&lt;br /&gt;
            }&lt;br /&gt;
            pos.z += 0.4;&lt;br /&gt;
            integer linkNum = llGetNumberOfPrims();&lt;br /&gt;
            do{&lt;br /&gt;
                if(user == llGetLinkKey( linkNum ))//just checking to make sure the index is valid.&lt;br /&gt;
                {&lt;br /&gt;
                    llSetLinkPrimitiveParams(linkNum,&lt;br /&gt;
                                            [PRIM_POSITION, ((pos - (llRot2Up(rot) * size.z * 0.02638)) * localrot) + localpos,&lt;br /&gt;
                                             PRIM_ROTATION, rot * localrot / llGetRootRotation()]);&lt;br /&gt;
                    jump end;//cheaper but a tad slower then return&lt;br /&gt;
                }&lt;br /&gt;
            }while( --linkNum );&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {//It is rare that the sit target will bork but it does happen, this can help to fix it.&lt;br /&gt;
            llUnSit(user);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    @end;&lt;br /&gt;
}//Written by Strife Onizuka, size adjustment provided by Escort DeFarge&amp;lt;/lsl&amp;gt;&lt;br /&gt;
===GetSitTarget===&lt;br /&gt;
&amp;lt;lsl&amp;gt;list GetSitTarget(integer prim, key av)&lt;br /&gt;
{//WARNING: llGetObjectDetails can introduce an error that goes as far as the 5th decimal place!&lt;br /&gt;
 //This is highly unlikely to be ever noticed unless compounded over time.&lt;br /&gt;
 //Do not use while moving (like in a moving vehicle)!!!&lt;br /&gt;
    vector tp = llGetAgentSize(av);&lt;br /&gt;
    if(tp)&lt;br /&gt;
    {&lt;br /&gt;
        if(prim == LINK_THIS)//llGetLinkKey doesn&#039;t like LINK_THIS&lt;br /&gt;
            prim = llGetLinkNumber();&lt;br /&gt;
        &lt;br /&gt;
        list details = [OBJECT_POS, OBJECT_ROT];&lt;br /&gt;
        rotation f = llList2Rot(details = (llGetObjectDetails(llGetLinkKey(prim), details) + llGetObjectDetails(av, details)), 1);&lt;br /&gt;
        rotation r = llList2Rot(details, 3) / f;&lt;br /&gt;
	&lt;br /&gt;
        return [((llList2Vector(details, 2) - llList2Vector(details, 0)) / f) + (llRot2Up(r) * tp.z * 0.02638) - &amp;lt;0.0, 0.0, 0.4&amp;gt;, r];&lt;br /&gt;
    }&lt;br /&gt;
    return [];&lt;br /&gt;
}//Written by Strife Onizuka&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llSetSitText]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llAvatarOnSitTarget]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llUnSit]]|}}&lt;br /&gt;
|also_events={{LSL DefineRow||[[changed]]|}}&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|cat1=Sit&lt;br /&gt;
|cat2=Vehicle&lt;br /&gt;
|cat3=Prim&lt;br /&gt;
|cat4=Effects&lt;br /&gt;
|cat5=Teleport&lt;br /&gt;
|cat6&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSetClickAction&amp;diff=157483</id>
		<title>LlSetClickAction</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSetClickAction&amp;diff=157483"/>
		<updated>2008-11-28T22:47:46Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: Removed inventory as a catagory&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=333|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llSetClickAction&lt;br /&gt;
|p1_type=integer|p1_name=action|p1_desc=CLICK_ACTION_* flag&lt;br /&gt;
|func_desc=Sets the action performed when a prim is clicked upon.&lt;br /&gt;
|func_footnote=When the cursor is hovers over the prim the cursor image changes to reflect the action.&lt;br /&gt;
|caveats&lt;br /&gt;
|examples&lt;br /&gt;
|spec&lt;br /&gt;
|constants=&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&lt;br /&gt;
==Constants==&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 0.5em;&amp;quot;&amp;gt;&lt;br /&gt;
{{{!}} class=&amp;quot;sortable&amp;quot; {{Prettytable}}&lt;br /&gt;
{{!}}- {{Hl2}}&lt;br /&gt;
! {{!}} Flag&lt;br /&gt;
! title=&amp;quot;Value&amp;quot; {{!}}&lt;br /&gt;
! class=&amp;quot;unsortable&amp;quot; {{!}} Description&lt;br /&gt;
! class=&amp;quot;unsortable&amp;quot; {{!}} Cursor&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}{{LSL Const|CLICK_ACTION_NONE|integer|0|c=Performs the default action: when the prim is touched, touch events are triggered}}&lt;br /&gt;
{{!}}{{#var:value}}&lt;br /&gt;
{{!}}{{#var:comment}}&lt;br /&gt;
{{!}}&amp;lt;!--[[Image:]]--&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}{{LSL Const|CLICK_ACTION_TOUCH|integer|0|c=When the prim is touched, touch events are triggered}}&lt;br /&gt;
{{!}}{{#var:value}}&lt;br /&gt;
{{!}}{{#var:comment}}&lt;br /&gt;
{{!}}&amp;lt;!--[[Image:]]--&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}{{LSL Const|CLICK_ACTION_SIT|integer|1|c=When the prim is touched, the avatar sits upon it}}&lt;br /&gt;
{{!}}{{#var:value}}&lt;br /&gt;
{{!}}{{#var:comment}}&lt;br /&gt;
{{!}}[[Image:Toolsit.png‎]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}{{LSL Const|CLICK_ACTION_BUY|integer|2|c=When the prim is touched, the buy dialog is opened}}&lt;br /&gt;
{{!}}{{#var:value}}&lt;br /&gt;
{{!}}{{#var:comment}}&lt;br /&gt;
{{!}}[[Image:Toolbuy.png]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}{{LSL Const|CLICK_ACTION_PAY|integer|3|c=When the prim is touched, the pay dialog is opened}}&lt;br /&gt;
{{!}}{{#var:value}}&lt;br /&gt;
{{!}}{{#var:comment}}&lt;br /&gt;
{{!}}[[Image:Toolpay.png]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}{{LSL Const|CLICK_ACTION_OPEN|integer|4|c=When the prim is touched, the object inventory dialog is opened}}&lt;br /&gt;
{{!}}{{#var:value}}&lt;br /&gt;
{{!}}{{#var:comment}}&lt;br /&gt;
{{!}}[[Image:Toolopen.png]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}{{LSL Const|CLICK_ACTION_PLAY|integer|5|c=When the prim is touched, html-on-a-prim is enabled?}}&lt;br /&gt;
{{!}}{{#var:value}}&lt;br /&gt;
{{!}}{{#var:comment}}&lt;br /&gt;
{{!}}[[Image:Toolplay.png]]&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}{{LSL Const|CLICK_ACTION_OPEN_MEDIA|integer|6|c=When the prim is touched, the web media dialog is opened}}&lt;br /&gt;
{{!}}{{#var:value}}&lt;br /&gt;
{{!}}{{#var:comment}}&lt;br /&gt;
{{!}}[[Image:Toolmediaopen.png]]&lt;br /&gt;
{{!}}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llPassTouches]]}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events=&lt;br /&gt;
{{LSL DefineRow||[[touch_start]]}}&lt;br /&gt;
{{LSL DefineRow||[[touch]]}}&lt;br /&gt;
{{LSL DefineRow||[[touch_end]]}}&lt;br /&gt;
|also_articles={{LSL DefineRow||{{LSLGC|Detected}}}}&lt;br /&gt;
|notes&lt;br /&gt;
|history=Introduced in SL 1.19.1(0)&lt;br /&gt;
|cat1=Prim&lt;br /&gt;
|cat2=Touch&lt;br /&gt;
|cat3=Sit&lt;br /&gt;
|cat4=Money&lt;br /&gt;
|cat5=Media&lt;br /&gt;
|cat6=Effects&lt;br /&gt;
|cat7=&lt;br /&gt;
|cat8&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlRezObject&amp;diff=157473</id>
		<title>LlRezObject</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlRezObject&amp;diff=157473"/>
		<updated>2008-11-28T22:43:47Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function/inventory|inventory|uuid=false|type=object}}&lt;br /&gt;
{{LSL_Function&lt;br /&gt;
|func_id=104|func_sleep=0.1|func_energy=200.0&lt;br /&gt;
|func=llRezObject|sort=RezObject&lt;br /&gt;
|p1_type=string|p1_name=inventory&lt;br /&gt;
|p2_type=vector|p2_name=pos|p2_desc=position (in [[Viewer coordinate frames#Region|region coordinates]])|p2_hover=position (in region coordinates)&lt;br /&gt;
|p3_type=vector|p3_name=vel|p3_desc=velocity (max [[llVecMag|magnitude]] is 250)&lt;br /&gt;
|p4_type=rotation|p4_name=rot|p4_desc=rotation&lt;br /&gt;
|p5_type=integer|p5_name=param|p5_desc=[[on_rez]] event parameter and value returned by [[llGetStartParameter]] in the rezzed object.|p5_hover=on_rez event parameter and value returned by llGetStartParameter in the rezzed object.&lt;br /&gt;
|func_footnote=The root of &#039;&#039;&#039;inventory&#039;&#039;&#039; is not at &#039;&#039;&#039;pos&#039;&#039;&#039; but the center of &#039;&#039;&#039;inventory&#039;&#039;&#039; is.&amp;lt;br/&amp;gt;To have the root prim at &#039;&#039;&#039;pos&#039;&#039;&#039; use [[llRezAtRoot]] instead.&lt;br /&gt;
|func_desc=Instantiate &#039;&#039;&#039;inventory&#039;&#039;&#039; object at &#039;&#039;&#039;pos&#039;&#039;&#039; with velocity &#039;&#039;&#039;vel&#039;&#039;&#039; and rotation &#039;&#039;&#039;rot&#039;&#039;&#039; with start parameter &#039;&#039;&#039;param&#039;&#039;&#039;&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=&lt;br /&gt;
*In addition to the normal function delay, there is an additional delay based on the mass and velocity of the object rezzed.&lt;br /&gt;
**&amp;lt;code&amp;gt;rez_delay = mass * llVecMag(velocity) / 10;&amp;lt;/code&amp;gt; [http://forums.secondlife.com/showthread.php?t=82659]&lt;br /&gt;
*Silently fails to rez &#039;&#039;&#039;inventory&#039;&#039;&#039; if &#039;&#039;&#039;pos&#039;&#039;&#039; is more than 10 meters away from the prim trying to rez &#039;&#039;&#039;inventory&#039;&#039;&#039;.  So if your script is mysteriously failing to rez things, make sure you haven&#039;t (say) written &amp;quot;&amp;lt;0,0,1&amp;gt;&amp;quot; for the &#039;&#039;&#039;pos&#039;&#039;&#039; parameter rather than (say) &amp;quot;llGetPos() + &amp;lt;0,0,1&amp;gt;&amp;quot;.&lt;br /&gt;
* If the owner of the object does not have copy permission  on &#039;&#039;&#039;inventory&#039;&#039;&#039;, the object will no longer be present in inventory after it is rezzed (so another attempt to rez it is likely to fail); if the owner does have copy permission, then a copy is rezzed, and the original &#039;&#039;&#039;inventory&#039;&#039;&#039; remains in inventory.&lt;br /&gt;
*Silently fails if you don&#039;t have offline building rights on the land. Which means that you need to either: Own the land yourself. Be in the group that owns it, and the allow group to build parcel flag has to be enabled. Or everyone should be allowed to build. You can also deed the object to the group that owns the land, this will always work.&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer param)&lt;br /&gt;
     {&lt;br /&gt;
          llRezObject(&amp;quot;Object&amp;quot;, llGetPos() + &amp;lt;0.0,0.0,1.0&amp;gt;, &amp;lt;0.0,0.0,0.0&amp;gt;, &amp;lt;0.0,0.0,0.0,1.0&amp;gt;, 0);&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llRezAtRoot]]|Rezzes the object at the requested position}}&lt;br /&gt;
{{LSL DefineRow||[[llGetStartParameter]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llGodLikeRezObject]]|}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events=&lt;br /&gt;
{{LSL DefineRow||[[object_rez]]|triggered when this object rezzes an object from inventory}}&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|permission&lt;br /&gt;
|inventory&lt;br /&gt;
|negative_index&lt;br /&gt;
|cat1=Rez&lt;br /&gt;
|cat2=Object&lt;br /&gt;
|cat3=Inventory&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSetLinkPrimitiveParams&amp;diff=156453</id>
		<title>LlSetLinkPrimitiveParams</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSetLinkPrimitiveParams&amp;diff=156453"/>
		<updated>2008-11-28T16:26:28Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: Can get rot and pos using llGetObjectDetails&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Function/link|linknumber}}{{LSL Function&lt;br /&gt;
|func_id=328|func_sleep=0.2|func_energy=10.0&lt;br /&gt;
|func=llSetLinkPrimitiveParams|sort=SetLinkPrimitiveParams&lt;br /&gt;
|p1_type=integer|p1_name=linknumber&lt;br /&gt;
|p2_type=list|p2_name=rules&lt;br /&gt;
|func_desc=Set primitive parameters for &#039;&#039;&#039;linknumber&#039;&#039;&#039; based on &#039;&#039;&#039;rules&#039;&#039;&#039;.&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=*Applying an operation to [[LINK_SET]] is applied first to the root prim, then to each child prim.&lt;br /&gt;
*The sim will clamp attributes before storing them.&lt;br /&gt;
*The client will clamp attributes before rendering.&lt;br /&gt;
*There is currently no corresponding [[llGetLinkPrimitiveParams]] although [[llGetObjectDetails]] can get the position and rotation of a linked prim identified by its key.&lt;br /&gt;
**The only way to get many parameters from linked prims is to put a separate script in each child and use [[llMessageLinked|linked messages]].&lt;br /&gt;
|constants={{LSL Constants/PrimitiveParams|set|remote=true}}&lt;br /&gt;
|examples = &lt;br /&gt;
A simple script to light up a prim in a [[linkset]] when touched, and unlight the others using llSetLinkPrimitiveParams, when script is installed in the root prim of the linkset.&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        // Turn off all prims&lt;br /&gt;
        llSetLinkPrimitiveParams(LINK_SET,[PRIM_FULLBRIGHT,ALL_SIDES,FALSE]);&lt;br /&gt;
        // Turn on the one that was touched&lt;br /&gt;
        llSetLinkPrimitiveParams(llDetectedLinkNumber(0),[PRIM_FULLBRIGHT,ALL_SIDES,TRUE]);        &lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llSetPrimitiveParams]]|Set many primitive parameters}}&lt;br /&gt;
{{LSL DefineRow||[[llGetPrimitiveParams]]|Get many primitive parameters}}&lt;br /&gt;
{{LSL DefineRow||[[llSetLinkAlpha]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llSetLinkColor]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llSetLinkTexture]]|}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes=&lt;br /&gt;
Note that avatars sitting on the object can be moved with this function as well. See [[llSitTarget#Useful_Snippets]] for an example of this.&lt;br /&gt;
&lt;br /&gt;
The Mis-feature of using this function to move avatars 54 meters is now officialy supported according to Andrew Linden (see jira Link http://jira.secondlife.com/browse/SVC-3408?focusedCommentId=88574#action_88574 )&lt;br /&gt;
&lt;br /&gt;
The below example moves avatar to x,y,z without moving the prim they are sitting on.  If x,y,z is more than 54 meters away the function will silently fail. Remember x,y,z is in object ralative coordinates just like any other linked prim in a set.&lt;br /&gt;
&lt;br /&gt;
Agents are always the last prim in the set, so using llGetNumberOfPrims() for a single agent sitting on a vehicle is usefull.&lt;br /&gt;
&lt;br /&gt;
Example Code : llSetLinkPrimitiveParams(llGetNumberOfPrims(), [PRIM_POSITION, &amp;lt;x,y,z&amp;gt;]); &lt;br /&gt;
&lt;br /&gt;
Darling Brody (27/11/2008)&lt;br /&gt;
&lt;br /&gt;
|cat1=Prim&lt;br /&gt;
|cat2=Movement&lt;br /&gt;
|cat3=Status&lt;br /&gt;
|cat4=Texture&lt;br /&gt;
|cat5=Object&lt;br /&gt;
|cat6=Teleport&lt;br /&gt;
|cat7=Link/Set&lt;br /&gt;
|cat8&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlGetObjectDetails&amp;diff=156443</id>
		<title>LlGetObjectDetails</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlGetObjectDetails&amp;diff=156443"/>
		<updated>2008-11-28T16:17:07Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: Linked to Link functions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function/limits}}{{LSL_Function/object|id|prim or avatar|sim=*}}&lt;br /&gt;
{{LSL_Function&lt;br /&gt;
|func_id=332|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llGetObjectDetails&lt;br /&gt;
|p1_type=key|p1_name=id&lt;br /&gt;
|p2_type=list|p2_name=params|p2_desc=OBJECT_* flags&lt;br /&gt;
|return_type=list|return_text=of the details specified in &#039;&#039;&#039;params&#039;&#039;&#039; for the object with key &#039;&#039;&#039;id&#039;&#039;&#039;.&lt;br /&gt;
|func_footnote={{LSL Const|OBJECT_UNKNOWN_DETAIL|integer|-1|c=}} is returned when passed an invalid integer parameter.&lt;br /&gt;
|caveats=&lt;br /&gt;
*Items in &#039;&#039;&#039;params&#039;&#039;&#039; that are not integers are silently ignored, {{LSL Const|OBJECT_UNKNOWN_DETAIL|integer|-1|c=}} is not returned.&lt;br /&gt;
*If an object represented by &#039;&#039;&#039;id&#039;&#039;&#039; is not in the sim an empty list is returned. &lt;br /&gt;
*An empty list is also returned if the key given was an item in inventory (object or agent).&lt;br /&gt;
*If &#039;&#039;&#039;id&#039;&#039;&#039; represents an agent, this function will continue to return information for approximately 45 seconds after they have left the sim (but the information is not updated).&lt;br /&gt;
*[[llTargetOmega]] will only effect the return of [[OBJECT_ROT]] if the object is [[STATUS_PHYSICS|physical]]. If the object is not physical then the original start rotation is returned, [[llTargetOmega]] is a {{LSLGC|Effects|client side effect}}.&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    collision_start(integer i)&lt;br /&gt;
    {&lt;br /&gt;
        list a = llGetObjectDetails(llDetectedKey(0), ([OBJECT_NAME, &lt;br /&gt;
                    OBJECT_DESC, OBJECT_POS, OBJECT_ROT, OBJECT_VELOCITY,&lt;br /&gt;
                    OBJECT_OWNER, OBJECT_GROUP, OBJECT_CREATOR]));&lt;br /&gt;
        llWhisper(0,&amp;quot;UUID: &amp;quot;         + (string)llDetectedKey(0) +&lt;br /&gt;
                  &amp;quot;\nName: \&amp;quot;&amp;quot;       + llList2String(a,0) + &amp;quot;\&amp;quot;&amp;quot; +&lt;br /&gt;
                  &amp;quot;\nDecription: \&amp;quot;&amp;quot; + llList2String(a,1) + &amp;quot;\&amp;quot;&amp;quot; +&lt;br /&gt;
                  &amp;quot;\nPosition: &amp;quot;     + llList2String(a,2) +&lt;br /&gt;
                  &amp;quot;\nRotation: &amp;quot;     + llList2String(a,3) +&lt;br /&gt;
                  &amp;quot;\nVelocity: &amp;quot;     + llList2String(a,4) +&lt;br /&gt;
                  &amp;quot;\nOwner: &amp;quot;        + llList2String(a,5) +&lt;br /&gt;
                  &amp;quot;\nGroup: &amp;quot;        + llList2String(a,6) +&lt;br /&gt;
                  &amp;quot;\nCreator: &amp;quot;      + llList2String(a,7));&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|spec&lt;br /&gt;
|constants={{LSL Constants/Object Details}}&lt;br /&gt;
|helpers=See {{LSLGC|Link/Get}} for some {{LSLGC|Link|link}} related helper functions. Since there is no function to get linked prim parameters, this can be useful if you need to get the position and rotation of a linked prim.&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llKey2Name]]}}&lt;br /&gt;
{{LSL DefineRow||[[llGetPrimitiveParams]]}}&lt;br /&gt;
{{LSL DefineRow||[[llSetLinkPrimitiveParams]]}}&lt;br /&gt;
{{LSL DefineRow||[[llSetPrimitiveParams]]}}&lt;br /&gt;
{{LSL DefineRow||[[llGetParcelDetails]]}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles={{LSL DefineRow||{{LSLGC|Detected}}}}&lt;br /&gt;
{{LSL DefineRow||[[Prim Attribute Overloading]]}}&lt;br /&gt;
|notes&lt;br /&gt;
|history=Introduced in SL 1.18.3(2)&lt;br /&gt;
|cat1=Object&lt;br /&gt;
|cat2=Prim&lt;br /&gt;
|cat3=Avatar&lt;br /&gt;
|cat4=Owner&lt;br /&gt;
|cat5=Creator&lt;br /&gt;
|cat6=Group&lt;br /&gt;
|cat7=Link&lt;br /&gt;
|cat8&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlGetStatus&amp;diff=93560</id>
		<title>LlGetStatus</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlGetStatus&amp;diff=93560"/>
		<updated>2008-09-28T22:39:29Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=46|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llGetStatus&lt;br /&gt;
|return_type=integer|p1_type=integer|p1_name=status|p1_desc=STATUS_* flag&lt;br /&gt;
|func_footnote&lt;br /&gt;
|func_desc&lt;br /&gt;
|return_text=boolean equal to the &#039;&#039;&#039;status&#039;&#039;&#039; of the object.&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=Status is an object attribute; all prims in an object share the same status.&lt;br /&gt;
|constants={{LSL Constants/Status}}&lt;br /&gt;
|examples=&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        if (llGetStatus(STATUS_PHYSICS))&lt;br /&gt;
        {&lt;br /&gt;
            llSay(0, &amp;quot;This object is physical&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            llSay(0, &amp;quot;This object is not physical&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||{{LSLG|llSetStatus}}|Sets the object status.}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|cat1&lt;br /&gt;
|cat2=Status&lt;br /&gt;
|cat3=Physics&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSetStatus&amp;diff=93559</id>
		<title>LlSetStatus</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSetStatus&amp;diff=93559"/>
		<updated>2008-09-28T22:38:11Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=45|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llSetStatus&lt;br /&gt;
|p1_type=integer|p1_name=status|p1_desc=bit mask, STATUS_* flags&lt;br /&gt;
|p2_type=integer|p2_name=value|p2_desc=boolean&lt;br /&gt;
|func_footnote&lt;br /&gt;
|func_desc=Sets the object status attributes indicated in the &#039;&#039;&#039;status&#039;&#039;&#039; mask to &#039;&#039;&#039;value&#039;&#039;&#039;&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=*Status is an object attribute; all prims in an object share the same status.&lt;br /&gt;
** Except for STATUS_BLOCK_GRAB, this only affects the prim the script is in, child prims in linked objects will not be affected.&lt;br /&gt;
|constants={{LSL Constants/Status}}&lt;br /&gt;
|examples=&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSetStatus( STATUS_DIE_AT_EDGE | STATUS_PHYSICS, TRUE);&lt;br /&gt;
        llSetStatus( STATUS_ROTATE_X | STATUS_ROTATE_Y, FALSE);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llGetStatus]]|Gets the object status.}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|cat1&lt;br /&gt;
|cat2=Status&lt;br /&gt;
|cat3=Physics&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlGetTimeOfDay&amp;diff=93545</id>
		<title>Talk:LlGetTimeOfDay</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlGetTimeOfDay&amp;diff=93545"/>
		<updated>2008-09-28T22:12:42Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: New page: There&amp;#039;s been talk about allowing estate managers to change the day/night cycle, but currently it&amp;#039;s still 4 hours.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There&#039;s been talk about allowing estate managers to change the day/night cycle, but currently it&#039;s still 4 hours.&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlGetTimeOfDay&amp;diff=93544</id>
		<title>LlGetTimeOfDay</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlGetTimeOfDay&amp;diff=93544"/>
		<updated>2008-09-28T22:11:05Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func=llGetTimeOfDay&lt;br /&gt;
|func_id=80&lt;br /&gt;
|func_sleep=0.0&lt;br /&gt;
|func_energy=10.0&lt;br /&gt;
|return_type=float&lt;br /&gt;
|func_footnote=Second Life days cycles are 4 hours long (3 hours of light, 1 hour of dark). The sunrise and sunset time varies slowly (following the seasons?).&lt;br /&gt;
|func_desc&lt;br /&gt;
|return_text=that is the time in seconds with subsecond precision since Second Life server midnight (or since server boot; whichever is smaller).&lt;br /&gt;
|spec&lt;br /&gt;
|caveats&lt;br /&gt;
|constants&lt;br /&gt;
|examples&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llGetSunDirection]]|}}&lt;br /&gt;
|also_events&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|cat1=Time&lt;br /&gt;
|cat2=Region&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlGetTimeOfDay&amp;diff=93262</id>
		<title>LlGetTimeOfDay</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlGetTimeOfDay&amp;diff=93262"/>
		<updated>2008-09-27T23:13:58Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func=llGetTimeOfDay&lt;br /&gt;
|func_id=80&lt;br /&gt;
|func_sleep=0.0&lt;br /&gt;
|func_energy=10.0&lt;br /&gt;
|return_type=float&lt;br /&gt;
|func_footnote&lt;br /&gt;
|func_desc&lt;br /&gt;
|return_text=that is the time in seconds with subsecond precision since Second Life server midnight (or since server up-time; whichever is smaller)&lt;br /&gt;
|spec&lt;br /&gt;
|caveats&lt;br /&gt;
|constants&lt;br /&gt;
|examples&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llGetSunDirection]]|}}&lt;br /&gt;
|also_events&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|cat1=Time&lt;br /&gt;
|cat2=Region&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlGetTime&amp;diff=93261</id>
		<title>LlGetTime</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlGetTime&amp;diff=93261"/>
		<updated>2008-09-27T23:12:33Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=82|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llGetTime|sort=GetTime&lt;br /&gt;
|return_type=float&lt;br /&gt;
|return_text=that is script time in seconds with subsecond precision since the last sim reset, script reset or call to either [[llResetTime]] or [[llGetAndResetTime]].&lt;br /&gt;
|func_footnote&lt;br /&gt;
|spec=Script time differs from normal time, it is affected by time dilation. See [[llGetRegionTimeDilation]] for details.&lt;br /&gt;
|caveats=&lt;br /&gt;
*Script time resets when...&lt;br /&gt;
**Script reset (user or [[llResetScript]] or [[llResetOtherScript]])&lt;br /&gt;
**Simulator reset (admin or crash)&lt;br /&gt;
**Call to either [[llResetTime]] or [[llGetAndResetTime]]&lt;br /&gt;
*Script time doesn&#039;t measure real world time, it is affected by time dilation.&lt;br /&gt;
|examples=&amp;lt;lsl&amp;gt;&lt;br /&gt;
default {&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llResetTime();&lt;br /&gt;
    }&lt;br /&gt;
    touch_start(integer num_touch)&lt;br /&gt;
    {&lt;br /&gt;
        float time = llGetTime(); //Instead getting, and then resetting the time, we could use llGetAndReset() to accomplish the same thing.&lt;br /&gt;
        llResetTime();&lt;br /&gt;
        llSay(0,(string)time + &amp;quot; seconds have elapsed since the last touch.&amp;quot; );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llResetTime]]}}&lt;br /&gt;
{{LSL DefineRow||[[llGetAndResetTime]]}}&lt;br /&gt;
{{LSL DefineRow||[[llGetRegionTimeDilation]]}}&lt;br /&gt;
|also&lt;br /&gt;
|notes=Script time does not measure time dilation.&lt;br /&gt;
To measure elapsed calendar time, call [[llGetTimestamp]] instead, since time dilation and resets often make dilated time intervals differ from calendar time intervals.&lt;br /&gt;
|cat1=Time&lt;br /&gt;
|cat2=Script&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlGetWallclock&amp;diff=93260</id>
		<title>LlGetWallclock</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlGetWallclock&amp;diff=93260"/>
		<updated>2008-09-27T23:10:30Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=81|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llGetWallclock|return_type=float&lt;br /&gt;
|func_footnote=For GMT use [[llGetGMTclock]]&lt;br /&gt;
|func_desc&lt;br /&gt;
|return_text=that is the time in seconds since midnight Pacific time (PST/PDT), truncated to whole seconds.&lt;br /&gt;
|spec&lt;br /&gt;
|caveats&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&amp;lt;lsl&amp;gt;// Real World Sun&lt;br /&gt;
integer set;&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSetTimerEvent(0.1);&lt;br /&gt;
        set = -1;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    timer()&lt;br /&gt;
    {&lt;br /&gt;
        float time = llGetWallclock();&lt;br /&gt;
        if(set == -1)&lt;br /&gt;
            llSetTimerEvent(60.0);&lt;br /&gt;
        if(time &amp;lt; 21600)&lt;br /&gt;
        {&lt;br /&gt;
            if(set)&lt;br /&gt;
            {&lt;br /&gt;
                llSetText(&amp;quot;The Sun is coming! :)&amp;quot;, &amp;lt;1,1,0&amp;gt;, 1.0);&lt;br /&gt;
                set = 0;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        else if(time &amp;lt; 64800)&lt;br /&gt;
        {&lt;br /&gt;
            if(set != 1)&lt;br /&gt;
            {&lt;br /&gt;
                llSetText(&amp;quot;Sun has risen. :(&amp;quot;, &amp;lt;1,0,0&amp;gt;, 1.0);&lt;br /&gt;
                set = 1;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        else if(set != 2)&lt;br /&gt;
        {&lt;br /&gt;
            llSetText(&amp;quot;Goodbye Sun. :(&amp;quot;, &amp;lt;1,0,0&amp;gt;, 1.0);&lt;br /&gt;
            set = 2;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llGetGMTclock]]|Seconds since midnight GMT}}&lt;br /&gt;
|also_events&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|permission&lt;br /&gt;
|negative_index&lt;br /&gt;
|sort=GetWallclock&lt;br /&gt;
|cat1=Time&lt;br /&gt;
|cat2&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlGetGMTclock&amp;diff=93259</id>
		<title>LlGetGMTclock</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlGetGMTclock&amp;diff=93259"/>
		<updated>2008-09-27T23:09:41Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=282|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llGetGMTclock|return_type=float&lt;br /&gt;
|func_footnote=For SL time, which is the same as California time, use [[llGetWallclock]]&lt;br /&gt;
|func_desc&lt;br /&gt;
|return_text=that is the time in seconds since midnight GMT.  Value appears to be truncated to the second.&lt;br /&gt;
|spec&lt;br /&gt;
|caveats&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
//--// GMT function with local offsets in 12hr format //--//&lt;br /&gt;
 &lt;br /&gt;
integer gIntMinute = 60;    //-- 1 minute in seconds&lt;br /&gt;
integer gIntHour   = 3600;  //-- 1 hour in seconds&lt;br /&gt;
integer gInt12Hr   = 43200; //-- 12hrs in seconds&lt;br /&gt;
integer gIntDay    = 86400; //-- 1 day in seconds&lt;br /&gt;
 &lt;br /&gt;
string fStrGMTwOffset( integer vIntLocalOffset ){&lt;br /&gt;
   //-- get the correct time in seconds for the given offset&lt;br /&gt;
  integer vIntBaseTime = ((integer)llGetGMTclock() + gIntDay + vIntLocalOffset * gIntHour) % gIntDay;&lt;br /&gt;
  string vStrReturn;&lt;br /&gt;
 &lt;br /&gt;
   //-- store morning or night and reduce to 12hour format if needed&lt;br /&gt;
  if (vIntBaseTime &amp;lt; gInt12Hr){&lt;br /&gt;
    vStrReturn = &amp;quot; AM&amp;quot;;&lt;br /&gt;
  }else{&lt;br /&gt;
    vStrReturn = &amp;quot; PM&amp;quot;;&lt;br /&gt;
    vIntBaseTime = vIntBaseTime % gInt12Hr;&lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
   //-- get and format minutes&lt;br /&gt;
  integer vIntMinutes = (vIntBaseTime % gIntHour) / gIntMinute;&lt;br /&gt;
  vStrReturn = (string)vIntMinutes + vStrReturn;&lt;br /&gt;
  if (10 &amp;gt; vIntMinutes){&lt;br /&gt;
    vStrReturn = &amp;quot;0&amp;quot; + vStrReturn;&lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
   //-- add in the correct hour, force 0 to 12&lt;br /&gt;
  if (vIntBaseTime &amp;lt; gIntHour){&lt;br /&gt;
    vStrReturn = &amp;quot;12:&amp;quot; + vStrReturn;&lt;br /&gt;
  }else{&lt;br /&gt;
    vStrReturn = (string)(vIntBaseTime / gIntHour) + &amp;quot;:&amp;quot; + vStrReturn;&lt;br /&gt;
  }&lt;br /&gt;
  return vStrReturn;&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
default{&lt;br /&gt;
  touch_start( integer vIntTouched ){&lt;br /&gt;
     //-- &#039;-8&#039; is california time, no adjustment for DST&lt;br /&gt;
    llSay( 0, &amp;quot;The time is now &amp;quot; + fStrGMTwOffset( -8 ) );&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
// Gets the number of milliseconds since midnight UTC.&lt;br /&gt;
integer GetGMTmsclock()&lt;br /&gt;
{&lt;br /&gt;
    string stamp = llGetTimestamp();&lt;br /&gt;
    return&lt;br /&gt;
        (integer) llGetSubString(stamp, 11, 12) * 3600000 +&lt;br /&gt;
        (integer) llGetSubString(stamp, 14, 15) * 60000 +&lt;br /&gt;
        llRound((float) llGetSubString(stamp, 17, -2) * 1000.0);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llGetWallclock]]|Seconds since midnight PST}}&lt;br /&gt;
|also_events&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|permission&lt;br /&gt;
|negative_index&lt;br /&gt;
|cat1=Time&lt;br /&gt;
|cat2&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSetScriptState&amp;diff=85068</id>
		<title>LlSetScriptState</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSetScriptState&amp;diff=85068"/>
		<updated>2008-08-11T00:56:03Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: Adding other reset conditions not mentioned in the bug report.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function/inventory|name|uuid=false|type=script}}&lt;br /&gt;
{{LSL_Function&lt;br /&gt;
|func_id=148|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llSetScriptState&lt;br /&gt;
|p1_type=string|p1_name=name&lt;br /&gt;
|p2_type=integer|p2_name=run|p2_desc=boolean, if {{LSLG|FALSE}} the script will be disabled.&lt;br /&gt;
|func_footnote&lt;br /&gt;
|func_desc=Set the running state of the script &#039;&#039;&#039;name&#039;&#039;&#039;.&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=*Cannot be used to restart a script that has encoutered a {{LSLGC|Error|run-time error}}.&lt;br /&gt;
*The script appears to stop when its time slice ends, not sooner. If a script tries to stop itself then some LSL code following the llSetScriptState call may be executed before the script stops.&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;lsl&amp;gt;//Stops the Script, at some non-deterministic time later, until invoked with TRUE, in another script&lt;br /&gt;
llSetScriptState(llGetScriptName(),FALSE);&lt;br /&gt;
// Stall until end of time slice&lt;br /&gt;
llSleep(0.1);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&amp;lt;lsl&amp;gt;//Starts Another Script&lt;br /&gt;
llSetScriptState(&amp;quot;somescript&amp;quot;,TRUE);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llGetScriptState]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llResetOtherScript]]|}}&lt;br /&gt;
|also_events&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|issues=&lt;br /&gt;
{{Bug|SVC-1853|Scripts deactivated by [[llSetScriptState]] are reset when the region is reset, when they are taken into inventory and re-rezzed and when crossing sim boundaries.}}&lt;br /&gt;
|cat1=Script&lt;br /&gt;
|cat2&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlSetScriptState&amp;diff=85066</id>
		<title>Talk:LlSetScriptState</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlSetScriptState&amp;diff=85066"/>
		<updated>2008-08-11T00:55:07Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: New page: Please do not remove content when making edits. The important point with llSetScriptState is that relying on an inactive script to keep  its state is unwise. It can loose it in many ways o...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Please do not remove content when making edits. The important point with llSetScriptState is that relying on an inactive script to keep  its state is unwise. It can loose it in many ways of which resetting the sim in only one. This is a trap for programmers attempting to use it and I fail to see how minimizing that helps users of the Wiki.&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSetScriptState&amp;diff=80936</id>
		<title>LlSetScriptState</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSetScriptState&amp;diff=80936"/>
		<updated>2008-07-28T01:06:58Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function/inventory|name|uuid=false|type=script}}&lt;br /&gt;
{{LSL_Function&lt;br /&gt;
|func_id=148|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llSetScriptState&lt;br /&gt;
|p1_type=string|p1_name=name&lt;br /&gt;
|p2_type=integer|p2_name=run|p2_desc=boolean, if {{LSLG|FALSE}} the script will be disabled.&lt;br /&gt;
|func_footnote&lt;br /&gt;
|func_desc=Set the running state of the script &#039;&#039;&#039;name&#039;&#039;&#039;.&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=*Cannot be used to restart a script that has encoutered a {{LSLGC|Error|run-time error}}.&lt;br /&gt;
*The script appears to stop when its time slice ends, not sooner. If a script tries to stop itself then some LSL code following the llSetScriptState call may be executed before the script stops.&lt;br /&gt;
*This function has a major problem if a script needs to keep any state information. If the server is reset, or the object taken into inventory and re-rezzed and possibly when crossing a sim boundary, all state information for all inactive scripts is lost. As of 25/07/2008 according to Scouse Linden the server reset bug will not be fixed.&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
//Stops the Script, at some non-deterministic time later, until invoked with TRUE, in another script&lt;br /&gt;
llSetScriptState(llGetScriptName(),FALSE);&lt;br /&gt;
// Stall until end of time slice&lt;br /&gt;
llSleep(0.1);&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
//Starts Another Script&lt;br /&gt;
llSetScriptState(&amp;quot;somescript&amp;quot;,TRUE);&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llGetScriptState]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llResetOtherScript]]|}}&lt;br /&gt;
|also_events&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|sort=SetScriptState&lt;br /&gt;
|cat1=Script&lt;br /&gt;
|cat2&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSetPrimitiveParams&amp;diff=72206</id>
		<title>LlSetPrimitiveParams</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSetPrimitiveParams&amp;diff=72206"/>
		<updated>2008-06-15T20:58:36Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Function&lt;br /&gt;
|func_id=259|func_sleep=0.2|func_energy=10.0|func=llSetPrimitiveParams|sort=SetPrimitiveParams&lt;br /&gt;
|p1_type=list|p1_name=rules&lt;br /&gt;
|func_desc=Sets the prims parameters according to &#039;&#039;&#039;rules&#039;&#039;&#039;.&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=&lt;br /&gt;
*The sim will clamp attributes before storing them.&lt;br /&gt;
*The client will clamp attributes before rendering.&lt;br /&gt;
*Scripts written before September 2004 that use [[PRIM_TYPE]] depend on PRIM_TYPE to have the value 1; if these scripts are recompiled, the new value of {{HoverText|PRIM_TYPE|Value: 9}} will be used causing errors at runtime.&lt;br /&gt;
**To fix this replace the PRIM_TYPE flag with the value 1 or updated to the newer PRIM_TYPE syntax.&lt;br /&gt;
|constants={{LSL Constants/PrimitiveParams|set}}&lt;br /&gt;
|examples=&amp;lt;lsl&amp;gt;&lt;br /&gt;
// To color all sides of a prim black, except side 3 white&lt;br /&gt;
llSetPrimitiveParams([PRIM_COLOR, ALL_SIDES, &amp;lt;0.0,0.0,0.0&amp;gt;, 1.0]);&lt;br /&gt;
llSetPrimitiveParams([PRIM_COLOR, 3, &amp;lt;1.0,1.0,1.0&amp;gt;, 1.0]);&lt;br /&gt;
&lt;br /&gt;
// To render on side 3 &lt;br /&gt;
// the picture with the UUID... &lt;br /&gt;
// and the repeats per face as vector, &lt;br /&gt;
// the texture offset as second vector, &lt;br /&gt;
// and the texture rotation as float&lt;br /&gt;
llSetPrimitiveParams([PRIM_TEXTURE, 3, &amp;quot;4d304955-2b01-c6c6-f545-c1ae1e618288&amp;quot;, &amp;lt;1.0,1.0,0.0&amp;gt;, &amp;lt;0.0,0.0,0.0&amp;gt;, 0.0]);&lt;br /&gt;
&lt;br /&gt;
// To set the prim &amp;quot;Full Bright&amp;quot; on sides 3&lt;br /&gt;
llSetPrimitiveParams([PRIM_FULLBRIGHT,3,TRUE]);&lt;br /&gt;
&lt;br /&gt;
// And to make it all in one breath,&lt;br /&gt;
llSetPrimitiveParams([PRIM_COLOR, ALL_SIDES, &amp;lt;0.0,0.0,0.0&amp;gt;, 1.0,&lt;br /&gt;
                      PRIM_COLOR, 3, &amp;lt;1.0,1.0,1.0&amp;gt;, 1.0,&lt;br /&gt;
                      PRIM_TEXTURE, 3, &amp;quot;4d304955-2b01-c6c6-f545-c1ae1e618288&amp;quot;, &amp;lt;1.0,1.0,0.0&amp;gt;, &amp;lt;0.0,0.0,0.0&amp;gt;, 0.0,&lt;br /&gt;
                      PRIM_FULLBRIGHT, 3, TRUE]);&lt;br /&gt;
&lt;br /&gt;
//And If you want to place it above you bed, to make you sleep well, and the coords of that place are for example &amp;lt;x, y, z&amp;gt;&lt;br /&gt;
llSetPrimitiveParams([PRIM_COLOR, ALL_SIDES, &amp;lt;0.0,0.0,0.0&amp;gt;, 1.0, &lt;br /&gt;
                      PRIM_COLOR, 3, &amp;lt;1.0,1.0,1.0&amp;gt;, 1.0,&lt;br /&gt;
                      PRIM_TEXTURE, 3, &amp;quot;4d304955-2b01-c6c6-f545-c1ae1e618288&amp;quot;, &amp;lt;1.0,1.0,0.0&amp;gt;, &amp;lt;0.0,0.0,0.0&amp;gt;,0.0,&lt;br /&gt;
                      PRIM_FULLBRIGHT, 3, TRUE, &lt;br /&gt;
                      PRIM_POSITION, &amp;lt;x, y, z&amp;gt;]);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[User:Anylyn Hax|Anylyn Hax]] 04:38, 10 July 2007 (PDT)&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llGetPrimitiveParams]]|Get many primitive parameters}}&lt;br /&gt;
{{LSL DefineRow||[[llSetLinkPrimitiveParams]]|Set parameters on other prims in linkset}}&lt;br /&gt;
{{LSL DefineRow||[[llSetAlpha]]|Simpler way to set alpha (transparency)}}&lt;br /&gt;
{{LSL DefineRow||[[llSetTexture]]|Simpler way to set texture}}&lt;br /&gt;
{{LSL DefineRow||[[llSetColor]]|Simpler way to set color}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes=The old PRIM_TYPE interface (labeled PRIM_TYPE_LEGACY) while technical retired can still be used.&lt;br /&gt;
|cat1=Prim&lt;br /&gt;
|cat2=Movement&lt;br /&gt;
|cat3=Status&lt;br /&gt;
|cat4=Texture&lt;br /&gt;
|cat5=Object&lt;br /&gt;
|cat6=&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSetPrimitiveParams&amp;diff=72205</id>
		<title>LlSetPrimitiveParams</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSetPrimitiveParams&amp;diff=72205"/>
		<updated>2008-06-15T20:56:46Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: Getting this into catagory list&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Function&lt;br /&gt;
|func_id=259|func_sleep=0.2|func_energy=10.0|func=llSetPrimitiveParams|sort=llSetPrimitiveParams&lt;br /&gt;
|p1_type=list|p1_name=rules&lt;br /&gt;
|func_desc=Sets the prims parameters according to &#039;&#039;&#039;rules&#039;&#039;&#039;.&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=&lt;br /&gt;
*The sim will clamp attributes before storing them.&lt;br /&gt;
*The client will clamp attributes before rendering.&lt;br /&gt;
*Scripts written before September 2004 that use [[PRIM_TYPE]] depend on PRIM_TYPE to have the value 1; if these scripts are recompiled, the new value of {{HoverText|PRIM_TYPE|Value: 9}} will be used causing errors at runtime.&lt;br /&gt;
**To fix this replace the PRIM_TYPE flag with the value 1 or updated to the newer PRIM_TYPE syntax.&lt;br /&gt;
|constants={{LSL Constants/PrimitiveParams|set}}&lt;br /&gt;
|examples=&amp;lt;lsl&amp;gt;&lt;br /&gt;
// To color all sides of a prim black, except side 3 white&lt;br /&gt;
llSetPrimitiveParams([PRIM_COLOR, ALL_SIDES, &amp;lt;0.0,0.0,0.0&amp;gt;, 1.0]);&lt;br /&gt;
llSetPrimitiveParams([PRIM_COLOR, 3, &amp;lt;1.0,1.0,1.0&amp;gt;, 1.0]);&lt;br /&gt;
&lt;br /&gt;
// To render on side 3 &lt;br /&gt;
// the picture with the UUID... &lt;br /&gt;
// and the repeats per face as vector, &lt;br /&gt;
// the texture offset as second vector, &lt;br /&gt;
// and the texture rotation as float&lt;br /&gt;
llSetPrimitiveParams([PRIM_TEXTURE, 3, &amp;quot;4d304955-2b01-c6c6-f545-c1ae1e618288&amp;quot;, &amp;lt;1.0,1.0,0.0&amp;gt;, &amp;lt;0.0,0.0,0.0&amp;gt;, 0.0]);&lt;br /&gt;
&lt;br /&gt;
// To set the prim &amp;quot;Full Bright&amp;quot; on sides 3&lt;br /&gt;
llSetPrimitiveParams([PRIM_FULLBRIGHT,3,TRUE]);&lt;br /&gt;
&lt;br /&gt;
// And to make it all in one breath,&lt;br /&gt;
llSetPrimitiveParams([PRIM_COLOR, ALL_SIDES, &amp;lt;0.0,0.0,0.0&amp;gt;, 1.0,&lt;br /&gt;
                      PRIM_COLOR, 3, &amp;lt;1.0,1.0,1.0&amp;gt;, 1.0,&lt;br /&gt;
                      PRIM_TEXTURE, 3, &amp;quot;4d304955-2b01-c6c6-f545-c1ae1e618288&amp;quot;, &amp;lt;1.0,1.0,0.0&amp;gt;, &amp;lt;0.0,0.0,0.0&amp;gt;, 0.0,&lt;br /&gt;
                      PRIM_FULLBRIGHT, 3, TRUE]);&lt;br /&gt;
&lt;br /&gt;
//And If you want to place it above you bed, to make you sleep well, and the coords of that place are for example &amp;lt;x, y, z&amp;gt;&lt;br /&gt;
llSetPrimitiveParams([PRIM_COLOR, ALL_SIDES, &amp;lt;0.0,0.0,0.0&amp;gt;, 1.0, &lt;br /&gt;
                      PRIM_COLOR, 3, &amp;lt;1.0,1.0,1.0&amp;gt;, 1.0,&lt;br /&gt;
                      PRIM_TEXTURE, 3, &amp;quot;4d304955-2b01-c6c6-f545-c1ae1e618288&amp;quot;, &amp;lt;1.0,1.0,0.0&amp;gt;, &amp;lt;0.0,0.0,0.0&amp;gt;,0.0,&lt;br /&gt;
                      PRIM_FULLBRIGHT, 3, TRUE, &lt;br /&gt;
                      PRIM_POSITION, &amp;lt;x, y, z&amp;gt;]);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[User:Anylyn Hax|Anylyn Hax]] 04:38, 10 July 2007 (PDT)&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llGetPrimitiveParams]]|Get many primitive parameters}}&lt;br /&gt;
{{LSL DefineRow||[[llSetLinkPrimitiveParams]]|Set parameters on other prims in linkset}}&lt;br /&gt;
{{LSL DefineRow||[[llSetAlpha]]|Simpler way to set alpha (transparency)}}&lt;br /&gt;
{{LSL DefineRow||[[llSetTexture]]|Simpler way to set texture}}&lt;br /&gt;
{{LSL DefineRow||[[llSetColor]]|Simpler way to set color}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes=The old PRIM_TYPE interface (labeled PRIM_TYPE_LEGACY) while technical retired can still be used.&lt;br /&gt;
|cat1=Prim&lt;br /&gt;
|cat2=Movement&lt;br /&gt;
|cat3=Status&lt;br /&gt;
|cat4=Texture&lt;br /&gt;
|cat5=Object&lt;br /&gt;
|cat6=&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlCreateLink&amp;diff=55150</id>
		<title>LlCreateLink</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlCreateLink&amp;diff=55150"/>
		<updated>2008-02-21T19:30:01Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: Added external link to Andrew Linden&amp;#039;s post on max link distances&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function/permission|PERMISSION_CHANGE_LINKS|grant=the owner}}{{LSL_Function&lt;br /&gt;
|func_id=141|func_sleep=1.0|func_energy=10.0&lt;br /&gt;
|func=llCreateLink|sort=CreateLink&lt;br /&gt;
|p1_type=key|p1_name=target|p1_desc=A prim in the same region.&lt;br /&gt;
|p2_type=integer|p2_name=parent|p2_desc=If [[FALSE]], then &#039;&#039;&#039;target&#039;&#039;&#039; becomes the root.&lt;br /&gt;
|func_footnote=&#039;&#039;&#039;target&#039;&#039;&#039; must be modifiable and have the same owner.&amp;lt;br/&amp;gt;&lt;br /&gt;
This object must also be modifiable.&lt;br /&gt;
|func_desc=Attempt to link the script&#039;s object with &#039;&#039;&#039;target&#039;&#039;&#039;.&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=*Shouts an error on [[DEBUG_CHANNEL]] if &#039;&#039;&#039;target&#039;&#039;&#039; isn&#039;t in the region or an object.&lt;br /&gt;
*If either the object or the &#039;&#039;&#039;target&#039;&#039;&#039; are not modifiable or of different owners, then an error is shouted on [[DEBUG_CHANNEL]].&lt;br /&gt;
*The maximum distance between linkable objects depends on the size of the objects as explained by Andrew Linden in this [http://forums.secondlife.com/showthread.php?t=11883 post].&lt;br /&gt;
|constants&lt;br /&gt;
|examples&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llBreakLink]]|Break a link}}&lt;br /&gt;
{{LSL DefineRow||[[llBreakAllLinks]]|Break all links}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|cat1=Link&lt;br /&gt;
|cat2&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Template:LSL_Function/link&amp;diff=54614</id>
		<title>Template:LSL Function/link</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Template:LSL_Function/link&amp;diff=54614"/>
		<updated>2008-02-18T17:06:46Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#vardefine:constants_nb|{{LSL_Constants/Link}}&lt;br /&gt;
{{#var:constants_nb}}}} &amp;lt;includeonly&amp;gt;[[Category:LSL Link]]&amp;lt;/includeonly&amp;gt;{{#vardefine:p_{{{1|}}}_desc|link number (0: unlinked, 1: root prim, &amp;gt;1: other prims) or a LINK_* flag }}{{#vardefine:also_functions|{{#var:also_functions}}&lt;br /&gt;
{{LSL DefineRow||[[llGetLinkNumber]]|Returns the link number of the prim the script is in.}}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Template:LSL_Function/link&amp;diff=54613</id>
		<title>Template:LSL Function/link</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Template:LSL_Function/link&amp;diff=54613"/>
		<updated>2008-02-18T17:03:34Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: Added link number values&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#vardefine:constants_nb|{{LSL_Constants/Link}}&lt;br /&gt;
{{#var:constants_nb}}}} &amp;lt;includeonly&amp;gt;[[Category:LSL Link]]&amp;lt;/includeonly&amp;gt;{{#vardefine:p_{{{1|}}}_desc|link number (0: unlinked, 1 root prim, &amp;gt;1 other prims) or a LINK_* flag }}{{#vardefine:also_functions|{{#var:also_functions}}&lt;br /&gt;
{{LSL DefineRow||[[llGetLinkNumber]]|Returns the link number of the prim the script is in.}}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Template:LSL_Constants/Link&amp;diff=54612</id>
		<title>Template:LSL Constants/Link</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Template:LSL_Constants/Link&amp;diff=54612"/>
		<updated>2008-02-18T16:40:01Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: Changed &amp;quot;task&amp;quot; to &amp;quot;prim&amp;quot; for consistancy&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{{!}}&lt;br /&gt;
{{!}}- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
{{!}}&lt;br /&gt;
{{{!}} {{Prettytable}}&lt;br /&gt;
{{!}}-{{Hl2}}&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}}Flag&lt;br /&gt;
!Description&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} {{LSL Const|LINK_ROOT|integer|1|c=sends to root prim in a linked set}}&lt;br /&gt;
{{!}} {{#var:value}}&lt;br /&gt;
{{!}} {{#var:comment}}&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} {{LSL Const|LINK_SET|integer|-1|c=sends to all prims}}&lt;br /&gt;
{{!}} {{#var:value}}&lt;br /&gt;
{{!}} {{#var:comment}}&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} {{LSL Const|LINK_ALL_OTHERS|integer|-2|c=sends to all other prims}}&lt;br /&gt;
{{!}} {{#var:value}}&lt;br /&gt;
{{!}} {{#var:comment}}&lt;br /&gt;
{{!}}}&lt;br /&gt;
{{!}}&lt;br /&gt;
{{{!}} {{Prettytable}}&lt;br /&gt;
{{!}}-{{Hl2}}&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}}Flag&lt;br /&gt;
!Description&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} {{LSL Const|LINK_ALL_CHILDREN|integer|-3|c=sends to all children}}&lt;br /&gt;
{{!}} {{#var:value}}&lt;br /&gt;
{{!}} {{#var:comment}}&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} {{LSL Const|LINK_THIS|integer|-4|c=sends to the prim the script is in}}&lt;br /&gt;
{{!}} {{#var:value}}&lt;br /&gt;
{{!}} {{#var:comment}}&lt;br /&gt;
{{!}}}&lt;br /&gt;
{{!}}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:Viewer_Visual_Update&amp;diff=51155</id>
		<title>Talk:Viewer Visual Update</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:Viewer_Visual_Update&amp;diff=51155"/>
		<updated>2008-01-25T15:33:03Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: Support for multiple monitors&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Thanx for the feedback thus far... ==&lt;br /&gt;
Hello and thanks for the comments! I&#039;m involved with this project, codename &amp;quot;Dazzle&amp;quot;, insofar as helping the Rx Team get the word out to our community. I haven&#039;t read all of these comments in close detail yet, but I appreciate not just the content, but the presentation too.&lt;br /&gt;
&lt;br /&gt;
LordJason Kiesler — thanks for embedding that graphic to communicate what you think of about the button gradients. If anyone else wants to contribute screenshot mockups, please, you&#039;re more than welcome. Since this is a &#039;&#039;visual&#039;&#039; update, those type of aids help.&lt;br /&gt;
&lt;br /&gt;
I also had [http://www.flickr.com/photos/torley/1801183618/ some nice comments on my Flickr photostream], and will be encouraging more... and responding in kind. Appreciatively yours! --[[User:Torley Linden|Torley Linden]] 16:28, 1 November 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
Great, [http://torley.com/introducing-second-lifes-dazzle-user-interface-update even more Dazzle feedback on my personal blog!] --[[User:Torley Linden|Torley Linden]] 08:04, 5 November 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
i love the new version :O is fantastic &amp;lt;br&amp;gt;&lt;br /&gt;
the near me bug is fixed exellent &amp;lt;br&amp;gt;&lt;br /&gt;
now i&#039;m bugfixing my purple version&amp;lt;br&amp;gt;&lt;br /&gt;
really a good job benjamin :D --[[User:Aliceinwire Bleac|Aliceinwire Bleac]] 04:56, 12 November 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== Feedback and Ideas ==&lt;br /&gt;
*As far as I&#039;m concerned, one of the gold standard issues for interface usability in this or any other application is the ability to pull pop up menus off the interface. If one can&#039;t do that, it doesn&#039;t matter how pretty they look; they block content and make working in the interface overly difficult. Gotta be able to pull stuff off the interface or it&#039;s more of the same with new candy colors. [Professor Beliveau/5:18SL 10/30/07]&lt;br /&gt;
* In the Mac instructions, if you start with &#039;Make a copy of the Second Life application with &amp;quot;Duplicate&amp;quot; and rename it &amp;quot;Second Life Visual Update&amp;quot;...&#039; and move on from there then the &amp;quot;uninstall&amp;quot; step won&#039;t be needed, and people can more easily compare the two. -- [[User:Argent Stonecutter|Argent Stonecutter]] 06:14, 22 October 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
* Great work on the graphics! Definitely shows off the potential for what can be done.&lt;br /&gt;
&lt;br /&gt;
Well how novel: ripping off the Mac OS X metallic buttons and giving them an Aqua feel... Well, don&#039;t stop there. Read Apple&#039;s Human Interface Guidelines and implement them. Then we&#039;ll not only have the feel too, but then the whole thing may work as standard instead of being buggy, bloated, roll your own code. We would have international settings and keyboards that worked, standard window behaviour, one menu bar not two, and text editing handling that worked properly, and properly transposed keyboard shorcuts. Get that stuff sorted first then you can think of moving on to skinning.&lt;br /&gt;
: I would like to point out, that SecondLife client is Cross-Platform. If they stuck to the Mac guidelines, then it wouldn&#039;t fit windows or linux. To be honest, as SecondLife is effectively a game, the interface has to be a roll your own (Read Apples guidelines, it actually says that somewhere) --[[User:Nik Woodget|Nik Woodget]] 02:37, 22 October 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
* Just to introduce the conservative voice *8) while I greatly appreciate thought going into the viewer and all, I wouldn&#039;t say that making the colors prettier and the buttons and icons slicker-looking would be where I&#039;d focus efforts if it was me.  Give me back a tearoffable friends list, let me tear off and move around llDialog() / GroupNotice style dropdowns, make the viewer notice and tell me something useful when packets-in-per-second drops to zero, and other actual functional enhancements would do me a world more good than shinier-looking buttons... [[User:Dale Innis|Dale Innis]] 11:06, 13 November 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
* Great look, how ever the big problems in the gui layout are net even addressed in this preview. Friends and group was so much more easier to use before the voice release. I really like to get that in the 18.4 viewer nice Linux bug fixes but no working friends list yet in that version. Voice i guess that will come some ware around 2010 at best. I&#039;m not asking for much just two patches from nicholaz. (and probably a hard admittance from someone onside Linden  that new look with friends inside the IM window was a bad idea.) --[[User:Balp Allen|Balp Allen]] 00:36, 14 November 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== Feedback on the style itself ==&lt;br /&gt;
&lt;br /&gt;
*The problem I&#039;m having is with the fact that most of the text in search results is white on a bright blue/gray background, which makes it hard to read. Also, text in profiles and (non-editable) group descriptions is difficult to read for the same reason. I think that adding more contrast would definitely improve the usability (not to mention the accessibility) of this skin. -- ????&lt;br /&gt;
&lt;br /&gt;
The theme seems to be mostly based on one of a variety of &amp;quot;glossy&amp;quot; 3d themes that have become popular in UNIX/X11 environments. I would much rather see the glossiness eliminated and something less overpowering being used as inspiration.&lt;br /&gt;
&lt;br /&gt;
Specific points:&lt;br /&gt;
:* With a light background ALL the text needs to be dark.&lt;br /&gt;
:* The window close and minimize buttons look smaller in this style, even if they aren&#039;t, and I keep slowing down to hit them more precisely.&lt;br /&gt;
:* The translucent menu bar is an improvement. It needs to extend under the menus themselves, of course. The backdrop for the button bars on the bottom should be translucent as well, for symmetry... and with the new style I don&#039;t think the little &amp;quot;loops&amp;quot; over the buttons above the chat bar are really useful.&lt;br /&gt;
:* The glossiness of the buttons is a problem, and they also look more like tabs than buttons. A flatter more &amp;quot;matte&amp;quot; style would work better.&lt;br /&gt;
:* The slight border around the chat and nametags is VERY nice.&lt;br /&gt;
:* The 3d look of hover text is not so good, I think because it&#039;s light. The light colored pie menu is &#039;&#039;really&#039;&#039; a problem.&lt;br /&gt;
:* The inventory and appearance editor seem significantly less professional.&lt;br /&gt;
:At the moment I think the original style is preferrable. I would say that the dark color scheme works better, particularly for translucent windows... if the ghosted windows could turn dark (but with light text) that would work, but that&#039;s probably more than XUI can handle. -- [[User:Argent Stonecutter|Argent Stonecutter]] 06:25, 22 October 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
*I&#039;m not a fan of square buttons.&lt;br /&gt;
*Like Argent I struggle with some of the light backgrounds&lt;br /&gt;
*Would it be possible to have an instruction page? This file does... for all the images. I know its possible to open them all, and I will, but pointers for how to tweak what be nice. I&#039;m going to try a nicer (for my eyes) skin with greens, similar to the theme I&#039;ve got on my mac menus, and hack some buttons, but it will take a while to get right because I&#039;m flying blind (particularly for .j2c&#039;s that don&#039;t automatically preview for me). --[[User:Eloise Pasteur|Eloise Pasteur]] 06:53, 22 October 2007 (PDT)&lt;br /&gt;
:* Good print, J2Cs aren&#039;t well supported in bitmap editors yet. -- [[User:Argent Stonecutter|Argent Stonecutter]] 09:14, 22 October 2007 (PDT)&lt;br /&gt;
:* In the textures folder is a textures.xml file.  This is the mapping {purpose}.tga -&amp;gt; UUID.{any extension} --[[User:Thraxis Epsilon|Thraxis Epsilon]] 11:51, 22 October 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
I too struggle with the chat history and permission/worn status in inventory, as it&#039;s light text on a light background, but I hope you&#039;ll correct this by darkening the text. I like dark text on a light background very much... but OTOH I can understand how in a dark environment, you might want the opposite, sort of like the dashboard on your car... can it be made skinnable, so people can have what they prefer? (Changing with time of day or ambient lighting is probably a bit much to ask for, but would be very cool.) --[[User:Melissa Yeuxdoux|Melissa Yeuxdoux]] 16:23, 2 November 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
=== Similarity to Mac/Aqua ===&lt;br /&gt;
Well how novel: ripping off the Mac OS X metallic buttons and giving them an Aqua feel... Well, don&#039;t stop there. Read Apple&#039;s Human Interface Guidelines and implement them. Then we&#039;ll not only have the feel too, but then the whole thing may work as standard instead of being buggy, bloated, roll your own code. We would have international settings and keyboards that worked, standard window behaviour, one menu bar not two, and text editing handling that worked properly, and properly transposed keyboard shorcuts. Get that stuff sorted first then you can think of moving on to skinning.&lt;br /&gt;
: I would like to point out, that SecondLife client is Cross-Platform. If they stuck to the Mac guidelines, then it wouldn&#039;t fit windows or linux. To be honest, as SecondLife is effectively a game, the interface has to be a roll your own (Read Apples guidelines, it actually says that somewhere) --[[User:Nik Woodget|Nik Woodget]] 02:37, 22 October 2007 (PDT)&lt;br /&gt;
:: I don&#039;t think it looks Mac-like at all. In fact while Apple popularized the glossy look the &amp;quot;shiny metallic&amp;quot; look isn&#039;t really their schtick, and they have been moving away from the aggressive glossiness of the early OS X versions to a smoother and more professional look in Panther and Tiger.  -- [[User:Argent Stonecutter|Argent Stonecutter]] 18:02, 22 October 2007 (PDT)&lt;br /&gt;
:::I personally wouldn’t complain if they implemented as much of Apple’s HIG as possible. I wouldn’t expect them to get rid of the in-window menubar, but it would be nice if things like keyboard layouts worked properly. —[[User:Frungi Stastny|Frungi Stastny]] 06:53, 23 October 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
=== Icons ===&lt;br /&gt;
&lt;br /&gt;
The icons representing prims in the object builder are too small. It is quite difficult to distinguish between similar prims as, for example, the cone and the semicone.--[[User:Eadoin Welles|Eadoin Welles]] 10:22, 22 October 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
I&#039;m not loving it... Although I do like some of the icons but color wise and color balance theme are killing my eyes.  The whole &amp;quot;gloss jem&amp;quot; buttons from Window Vista and OS Mac got really really old so fast.  For me, I&#039;d like a dark theme.   Something more like this theme. [[http://www.wincustomize.com/zoom.aspx?skinid=4617&amp;amp;libid=1]] --[[User:Vincent Nacon|Vincent Nacon]] 12:32, 22 October 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
I don&#039;t think the icons on the map or in other windows should be changed from the standard client unless absolutely necessary... and again I don&#039;t think that encapsulating the icons is really a good idea. -- [[User:Argent Stonecutter|Argent Stonecutter]] 18:06, 22 October 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
I really like the new icons in the inventory, they look much nicer than the old ones, however, the icons on the map, and the new ones in the title bar are really hard to read. Even from 5 inches away I still can&#039;t tell what that thing in the classifieds icon is supposed to be. It looks like two bars and a clock or a lip. The title bar land for sale icon is also really hard to read since you can&#039;t really see the $ unless you get really close to the screen. And I think the telehub icon might have too much detail in it for being so small. When you zoom all the way out on the map and see them all it gets really messy. --[[User:Kevin Susenko|Kevin Susenko]] 08:42, 8 December 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
I have to say I am underwhelmed by the icon set. Have you considered the [http://en.wikipedia.org/wiki/Tango_Desktop_Project Tango Desktop Project]? The Tango Project seeks to create a consistent graphical user interface experience across applications and platforms. IMHO, the quality of their icon sets is very high. Have a look at the icon sets and [http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines style guidelines on their website]. &amp;amp;mdash; [[User:Yuu Nakamichi|Yuu Nakamichi]] 15:21, 2 November 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Additional suggestions ==&lt;br /&gt;
This section should be kept for suggestions that are really beyond the scope of a theme change.&lt;br /&gt;
&lt;br /&gt;
=== Multiple Monitor Support ===&lt;br /&gt;
&lt;br /&gt;
Would like more than anything to see the UI windows capable of being moved onto a second monitor off the main viewer window. Now that would be very cool and make life a whole lot easier.&lt;br /&gt;
:This would also mean making that the second life viewer would have to use system controls. Again its a pain for cross-platform software. Though not impossible. --[[User:Nik Woodget|Nik Woodget]] 02:38, 22 October 2007 (PDT)&lt;br /&gt;
::Why would this require using system controls ?&lt;br /&gt;
::[[User:SignpostMarv Martin|SignpostMarv Martin]] 06:59, 22 October 2007 (PDT)&lt;br /&gt;
:::The UI in Second Life is part of the OpenGL rendering pipeline. In order for the controls to be seperated from the main window they would have to be contained in seperate OS controls. Maybe not system independent controls, perhaps custom controls rendered into borderless windows might work. --[[User:Nik Woodget|Nik Woodget]] 02:08, 28 November 2007 (PST)&lt;br /&gt;
:::: Aren&#039;t there free open-source cross platform systems already out there to do stuff like that?--[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 05:32, 13 November 2007 (PST)&lt;br /&gt;
::::: Possibly, do you have any you can suggest? --[[User:Nik Woodget|Nik Woodget]] 02:08, 28 November 2007 (PST)&lt;br /&gt;
:Let me add my support for multiple monitors with one dedicated to menus and controls to keep the main view screen wide open. This would be huge. [[User:Ralph Doctorow|Ralph Doctorow]] 07:33, 25 January 2008 (PST)&lt;br /&gt;
&lt;br /&gt;
=== Mac Support ===&lt;br /&gt;
&lt;br /&gt;
For the Mac port, at least, the way that command and control are reversed is really hard to deal with. It would be nice if there was an option to reverse the command and control keys &#039;&#039;for XUI only&#039;&#039;. -- [[User:Argent Stonecutter|Argent Stonecutter]] 06:07, 22 October 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
Whilst we&#039;re talking about this - can we add a request for a proper implementation of the Mac GUIs, without the irritating internal menus as well please. Swap the menu bar menus the way the GUI guidelines suggest. It&#039;s a different code base after all. I may have got used to this structure, but it&#039;s one bit of muscle memory I&#039;d be very happy to get rid of! --[[User:Eloise Pasteur|Eloise Pasteur]] 15:56, 22 October 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
=== Widgets ===&lt;br /&gt;
&lt;br /&gt;
I like the new interface. It is surely better than the black one but, by the way, the real value would be to have a choice of skins which, in my understanding, is the main goal of this test. I think that another improvement might be to have the possibility to add gadgets. For example, I would like to have, close to the PDT time, also the local time, since most of events that I prepare are located in my country, and I prefer to use local time rather than useless PDT time. Rather than adding this feature, which may be of no interest to USA people and surely not at all to California people, you may give us the possibility to create gadgets, like in Google or Vista. So I could develop a small gadget to see time in various timezones, another one that automatically convert Linden dollars to various currencies, and so forth. By facilitating the development of user gadgets, you would dramatically improve the SL interface without having to develop them yourself. IMHO  Greetings from Rome, Italy --[[User:Eadoin Welles|Eadoin Welles]] 10:19, 22 October 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
==== Vector Graphics Widgets ====&lt;br /&gt;
&lt;br /&gt;
Would like to see a flash layer, where flash widgets could communicate to the UI via an API and either replace or partially replace bits and pieces of it.  This could be a big market for companies wishing to have customized clients but still take advantage of Linden Labs robust source.&lt;br /&gt;
:I would actively NOT want to see a layer that can only be programmed with a closed system like flash. -- [[User:Argent Stonecutter|Argent Stonecutter]] 06:07, 22 October 2007 (PDT)&lt;br /&gt;
::SVG + Javascript would work- uBrowser would be the place to start with that.&lt;br /&gt;
::[[User:SignpostMarv Martin|SignpostMarv Martin]] 06:59, 22 October 2007 (PDT)&lt;br /&gt;
:::That&#039;s one approach. Javascript based controls are used in a number of programs: Firefox (XUL), Mac OS (Dashboard), Yahoo Widgets (for that matter Adobe&#039;s Actionscript has converged on Javascript). I&#039;m not sure that SVG is the way to go, but that&#039;s not an objection... I just don&#039;t know wnough about SVG. Another possibility is to use Tk, since that has bindings for several scripting languages already. All this is somewhat out of the scope of a theme change. -- [[User:Argent Stonecutter|Argent Stonecutter]] 08:47, 22 October 2007 (PDT)&lt;br /&gt;
::::SVG would provide an &amp;quot;open&amp;quot; system for vector graphics where flash provides a &amp;quot;closed&amp;quot; system.&lt;br /&gt;
::::[[User:SignpostMarv Martin|SignpostMarv Martin]] 12:41, 22 October 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
=== Skin Support ===&lt;br /&gt;
I&#039;d like to suggest Hue changer for quick custom theme color for users.... However, for graphic artist like myself, I would like to able customize the skin with ease.   Just think more like WinAmp 5. --[[User:Vincent Nacon|Vincent Nacon]] 12:32, 22 October 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
is also good to make a little program in php for the second life site or a executable for create new skin in more simple way &lt;br /&gt;
&lt;br /&gt;
this is my purple skin :)&lt;br /&gt;
[[Image:Dazzle_purple_version.JPG|thumb|300px|Purple Skin]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Aliceinwire Bleac|Aliceinwire Bleac]] 04:56, 7 November 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
* Purple skin made me smile a lot! Thanx for sharing that with Ben and I, Aliceinwire! /me open-secretly hopes for a green-and-pink skin. :D --[[User:Torley Linden|Torley Linden]] 11:26, 7 November 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
===Too Little===&lt;br /&gt;
Just looking at the pic...except for the icons, which are probably needed, I&#039;m underwhelmed.  It&#039;s the same old interface except for being white and shinier (IMO, too shiny), and the consensus among people I know tends torward the opinion that the UI needs to be reinvented, not just polished, and I&#039;d rather see development time being taken on that.  Take as an example the work being done by e-Sheep with their new custom client.  I&#039;m not saying they&#039;ve done things that I necescarily want to see but they&#039;ve got their goals in the right place.  I could list a number of UI suggestions and pet peeves but this isn&#039;t the place for it...some day I wil actualy get around to putting them on the JIRA.  That said, I agree with the people who mentioned skins and even just being able to set UI color preferences from the preferences menu; that by itself would address a lot of issues. [[User:Elle Pollack|Elle Pollack]] 15:00, 22 October 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
===Enhancement?===&lt;br /&gt;
I would love  to beable to collect a Landmark while viewing another resident&#039;s profile picks.  --[[User:Sabina Stenvaag] , 1 nov 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Buttons. ==&lt;br /&gt;
&lt;br /&gt;
The gradient effect on the buttons need to weigh one way or the other. Having the &#039;line&#039; go right through the text with as much contrast as it has, is distracting, and hard on the eyes.&lt;br /&gt;
I would suggest more smoothing to it as well.&lt;br /&gt;
Here is a mock up of what I mean. The lower left button is the only one modified.&lt;br /&gt;
[[Image:NewViewer_button_mockup.jpg|mock up]]&lt;br /&gt;
&lt;br /&gt;
== what is wrong with light text on dark background? ==&lt;br /&gt;
&lt;br /&gt;
for me, light text on dark background is way more comfortable for my eyes, I find light backgrounds kinda too aggressive :/&lt;br /&gt;
&lt;br /&gt;
why not continue with the dark backgrounds? imitating rl paper on software is kinda lame on my opinion :\ --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 01:08, 13 November 2007 (PST)&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlEuler2Rot&amp;diff=45977</id>
		<title>LlEuler2Rot</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlEuler2Rot&amp;diff=45977"/>
		<updated>2007-12-24T22:11:24Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: Added order of rotation in Euler vector&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=16|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llEuler2Rot|return_type=rotation|p1_type=vector|p1_name=v&lt;br /&gt;
|func_footnote&lt;br /&gt;
|func_desc&lt;br /&gt;
|return_text=representation of Euler Angles &#039;&#039;&#039;v&#039;&#039;&#039;.&lt;br /&gt;
|spec=The Euler angle vector is converted to a rotation by doing the rotations around the 3 axes in Z, Y, X order. So llRot2Euler(&amp;lt;1.0, 2.0, 3.0&amp;gt; * DEG_TO_RAD) generates a rotation by taking the zero rotation, a vector pointing along the X axis, first rotating it 3 degrees around the global Z axis, then rotating the resulting vector 2 degrees around the global Y axis, and finally rotating that 1 degree around the global X axis.&lt;br /&gt;
|caveats&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&amp;lt;pre&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        vector input = &amp;lt;73.0, -63.0, 20.0&amp;gt; * DEG_TO_RAD;//not advised to make your own quaternion&lt;br /&gt;
        rotation rot = llEuler2Rot(input);&lt;br /&gt;
        llSay(0,&amp;quot;The Euler2Rot of &amp;quot;+(string)input+&amp;quot; is: &amp;quot;+(string)rot );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llRot2Euler]]|}}&lt;br /&gt;
|also_events&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_articles={{LSL DefineRow||{{Wikipedia|Euler_Angles}}|}}&lt;br /&gt;
|notes&lt;br /&gt;
|permission&lt;br /&gt;
|negative_index&lt;br /&gt;
|cat1=Math/3D&lt;br /&gt;
|cat2=Rotation&lt;br /&gt;
|cat3=Euler&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Rotation&amp;diff=45975</id>
		<title>Rotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Rotation&amp;diff=45975"/>
		<updated>2007-12-24T22:00:11Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: Attempting to clarify the local and global rotation examples&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Multi-lang}}&lt;br /&gt;
{{LSL Header}}{{RightToc}}&lt;br /&gt;
=Rotations=&lt;br /&gt;
The LSL &#039;&#039;&#039;rotation&#039;&#039;&#039; type is used to represent an orientation in 3D.  (Note that we try to write the type name in &#039;&#039;&#039;bold&#039;&#039;&#039;.)&lt;br /&gt;
An orientation, or 3D angle, is represented by a mathematical object called a {{LSLG|quaternion}}.  You can think of a quaternion as four numbers, three of which represent the direction an object is facing and a fourth that represents the object&#039;s banking left or right around that direction. The main advantage of using &lt;br /&gt;
quaternions is that they are not susceptible to [http://en.wikipedia.org/wiki/Gimbal_Lock gimbal lock]. &lt;br /&gt;
For the complex inner workings of quaternion mathematics, see {{LSLG|quaternion}}. &lt;br /&gt;
For a list of functions and events related to rotations see {{LSLG|Rotation Synopsis}}.&lt;br /&gt;
There is also information about causing  textures to rotate in {{LSLG|texture}}s.&lt;br /&gt;
&lt;br /&gt;
==Other representations==&lt;br /&gt;
Another way to represent a rotation is using three numbers, &amp;lt;X, Y, Z&amp;gt;, which represent the amount (in [[radians]]) which the object is rotated around each axis.  This is used in the Edit window, for example, and is generally easy for people to visualize.  Note that these three numbers are a &#039;&#039;&#039;vector&#039;&#039;&#039; and not a &#039;&#039;&#039;rotation&#039;&#039;&#039; type, though it can represent the same information.  This is called the &#039;&#039;Euler&#039;&#039; representation of a rotation.&lt;br /&gt;
  &lt;br /&gt;
A third way is to use three vectors, showing what the front is pointing at, what the top is pointing at, and what the left side is pointing at.  Actually, only two of the three are needed, because any two determines the third.  &lt;br /&gt;
&lt;br /&gt;
For good reasons, such as being able to combine rotations, the four number version, the &#039;&#039;&#039;rotation&#039;&#039;&#039;, is better, though harder for a beginner to grasp. Fortunately it&#039;s very seldom necessary to do anything with the actual internal representation of &#039;&#039;rotations&#039;&#039; and there are functions for converting easily back and forth.&lt;br /&gt;
&lt;br /&gt;
==Right hand rule==&lt;br /&gt;
In LSL all rotations are done according to the &#039;&#039;&#039;right hand rule&#039;&#039;&#039;. With your right hand, extend the first finger in the direction of the positive direction of the x-axis. Extend your second finger at right angles to your first finger, it will point along the positive y-axis, and your thumb, extended at right angles to both will point along the positive z-axis. When you&#039;re editing an object, the three colored axis arrows point in the positive direction for each axis (X: red, Y: green, Z: blue).&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Right_hand_rule&lt;br /&gt;
&lt;br /&gt;
Now, don&#039;t remove your right hand just yet, there is another use for it, determining the direction of a positive rotation. Make a fist with your right hand, thumb extended and pointing in the positive direction of the axis you are interested in. Your fingers curl around in the direction of positive rotation. Rotations around the X, Y, and Z axis are often referred to as Roll, Pitch, and Yaw, particularly for vehicles.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Tait-Bryan_angles Roll Pitch Yaw]&lt;br /&gt;
&lt;br /&gt;
== Combining Rotations ==&lt;br /&gt;
&lt;br /&gt;
To combine &#039;&#039;&#039;rotations&#039;&#039;&#039;, you use the &#039;&#039;&#039;multiply&#039;&#039;&#039; and &#039;&#039;&#039;divide&#039;&#039;&#039; operators. Don&#039;t try to use addition or subtraction operators on &#039;&#039;&#039;rotations&#039;&#039;&#039;, as they will not do what you expect. The &#039;&#039;&#039;multiply&#039;&#039;&#039; operation applies the rotation in the positive direction, the &#039;&#039;&#039;divide&#039;&#039;&#039; operation does a negative rotation. You can also negate a rotation directly, just negate the s component, e.g. X.s = -X.s.&lt;br /&gt;
&lt;br /&gt;
Unlike other types such as {{LSLG|float}}, the order in which the operations are done, &lt;br /&gt;
[http://en.wikipedia.org/wiki/Commutative non-commutative], is important.&lt;br /&gt;
The reason for this is simple: the order you do rotations in is important in RL. For example, if you had a dart with four feathers, started from rotation &amp;lt;0, 0, 0&amp;gt; with its tail on the origin, it would lie on the X axis with its point aimed in the positive X direction, its feathers along the Z and Y axes, and the axes of the dart and the axes of the world would be aligned. We&#039;re going to rotate it 45 degrees around X and 30 degrees around Y, but in different orders.&lt;br /&gt;
&lt;br /&gt;
First, after rotating 45 deg around X the dart would still be on the X axis, unmoved, just turned along its long axis, so the feathers would be at 45 deg to the axes. Then rotating 30 deg around Y would move it in the XZ plane to point down 30 deg from the X axis (remember the right hand rule for rotations means a small positive rotation around Y moves the point down). The dart winds up pointing 30 deg down, in the same vertical plane it started in, but turned around its own long axis so the feathers are no longer up and down.&lt;br /&gt;
&lt;br /&gt;
If you did it the other way, first rotating 30 deg in Y, the dart would rotate down in the XZ plane, but notice that it no longer is on the X axis; its X axis and the world&#039;s aren&#039;t aligned any more. Now a 45 degree rotation around the X axis would pivot the dart around its tail, the point following a 30 deg cone whose axis is along the positive world X axis, for 45 degrees up and to the right. If you were looking down the X axis, it would pivot from pointing 30 deg below the X axis, up and to the right, out of the XZ plane, to a point below the 1st quadrant in the XY plane, its feathers rotating as it went.&lt;br /&gt;
&lt;br /&gt;
Clearly this is a different result from the first rotation, but the order of rotation is the only thing changed.&lt;br /&gt;
&lt;br /&gt;
To do a constant rotation you need to define a &#039;&#039;&#039;rotation&#039;&#039;&#039; value which can be done by creating a {{LSLG|vector}} with the X, Y, Z angles in radians as components (called an Euler angle), then converting that to a &#039;&#039;&#039;rotation&#039;&#039;&#039; by using the {{LSLG|llEuler2Rot}} function. You can alternately create the native rotation directly: the real part is the cosine of half the angle of rotation, and the vector part is the normalized axis of rotation multiplied by the sine of half the angle of rotation. To go from a rotation to an Euler angle {{LSLG|vector}} use {{LSLG|llRot2Euler}}.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; angles in LSL are in radians, not degrees, but you can easily convert by using the built-in constants [[#RAD_TO_DEG|RAD_TO_DEG]] and [[#DEG_TO_RAD|DEG_TO_RAD]]. For a 30 degree &#039;&#039;&#039;rotation&#039;&#039;&#039; around the X axis you might use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=0 cellspacing=0&lt;br /&gt;
|-&lt;br /&gt;
|rotation rot30X ||= {{LSLG|llEuler2Rot}}(&amp;lt;30, 0,0&amp;gt; * DEG_TO_RAD);||// convert the degrees to radians, then convert that {{LSLG|vector}} into a rotation, rot30x&lt;br /&gt;
|-&lt;br /&gt;
|{{LSLG|vector}} vec30X ||= {{LSLG|llRot2Euler}}(rot30X );||// convert the rotation back to a {{LSLG|vector}} (the values will be in radians)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Order of rotation for Euler Vectors ==&lt;br /&gt;
&lt;br /&gt;
From the above discussion, it&#039;s clear that when dealing with rotations around more than one axis, the order they are done in is critical. In the &#039;&#039;Euler&#039;&#039; discussion above this was kind of glossed over a bit, the individual rotations around the three axis define an overall &#039;&#039;rotation&#039;&#039;, but that begs the question: What axis order are the rotations done in? The answer is &#039;&#039;&#039;Z, Y, X&#039;&#039;&#039; in global coordinates. If you are trying to rotate an object around more than one axis at a time using the &#039;&#039;Euler&#039;&#039; representation, determine the correct &#039;&#039;Euler&#039;&#039; {{LSLG|vector}} using the Z, Y, X rotation order, then use the {{LSLG|llEuler2Rot}} function to get the &#039;&#039;&#039;rotation&#039;&#039;&#039; for use in combining rotations or applying the rotation to the object.&lt;br /&gt;
&lt;br /&gt;
== Local vs Global (World) rotations ==&lt;br /&gt;
&lt;br /&gt;
It is important to distinguish between the &#039;&#039;&#039;rotation&#039;&#039;&#039; relative to the world, and the &#039;&#039;&#039;rotation&#039;&#039;&#039; relative to the local object itself.  In the editor, you can switch back and forth from one to the other.  In a script, you must convert from one to the other to get the desired behavior.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Local&#039;&#039;&#039; rotations are ones done around the axes embedded in the object itself forward/back, left/right, up/down, irrespective of how the object is rotated in the world. &#039;&#039;&#039;Global&#039;&#039;&#039; rotations are ones done around the world axes, North/South, East/West, Higher/Lower. You can see the difference by rotating a prim, then edit it and change the axes settings between local and global, notice how the colored axes arrows change.&lt;br /&gt;
&lt;br /&gt;
In LSL, the difference between doing a &#039;&#039;&#039;local&#039;&#039;&#039; or &#039;&#039;&#039;global&#039;&#039;&#039; rotation is the order the &#039;&#039;&#039;rotations&#039;&#039;&#039; are evaluated in the statement.&lt;br /&gt;
&lt;br /&gt;
This does a &#039;&#039;&#039;local&#039;&#039;&#039; 30 degree rotation by putting the constant 30 degree &#039;&#039;&#039;rotation&#039;&#039;&#039; to the left of the object&#039;s starting &#039;&#039;&#039;rotation&#039;&#039;&#039; (myRot). It is like the first operation in the first example above, just twisting the dart 30 degrees around its own long axis. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=0 cellspacing=0&lt;br /&gt;
|-&lt;br /&gt;
|rotation localRot = ||rot30X * myRot;||// do a local rotation by multiplying a constant rotation by a world rotation&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To do a &#039;&#039;&#039;global&#039;&#039;&#039; rotation, use the same &#039;&#039;&#039;rotation&#039;&#039;&#039; values, but in the opposite order. This is like the second operation in the second example, the dart rotating up and to the right around the world X axis. In this case, the existing rotation (myRot) is rotated 30 degrees around the global X axis.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=0 cellspacing=0&lt;br /&gt;
|-&lt;br /&gt;
|rotation globalRot || = myRot * rot30X;||// do a global rotation by multiplying a world rotation by a constant rotation&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Another way to think about combining rotations ==&lt;br /&gt;
&lt;br /&gt;
You may want to think about this &#039;&#039;&#039;local&#039;&#039;&#039; vs &#039;&#039;&#039;global&#039;&#039;&#039; difference by considering that &#039;&#039;&#039;rotations&#039;&#039;&#039; are done in evaluation order, that is left to right except for parenthesized expressions.&lt;br /&gt;
&lt;br /&gt;
In the localRot case, what happened was that starting from &amp;lt;0, 0, 0&amp;gt;, the rot30X was done first, rotating the prim around the world X axis, but since when it&#039;s unrotated, the local and global axes are identical it has the effect of doing the rotation around the object&#039;s local X axis. Then the second &#039;&#039;&#039;rotation&#039;&#039;&#039; myRot was done which rotated the prim to its original rotation, but now with the additional X axis rotation baked in. What this looks like is that the prim rotated in place, around its own X axis, with the Y and Z rotations unchanged, a &#039;&#039;&#039;local&#039;&#039;&#039; rotation.&lt;br /&gt;
&lt;br /&gt;
In the globalRot case, again starting from &amp;lt;0, 0, 0&amp;gt;, first the object is rotated to its original rotation (myRot), but now the object&#039;s axes and the world&#039;s axes are no longer aligned! So, the second &#039;&#039;&#039;rotation&#039;&#039;&#039; rot30x does exactly what it did in the local case, rotates the object 30 degrees around the world X axis, but the effect is to rotate the object through a cone around the world X axis since the object&#039;s X axis and the world&#039;s X axis aren&#039;t the same this time. What this looks like is that the prim pivoted 30 degrees around the world X axis, hence a &#039;&#039;&#039;global&#039;&#039;&#039; rotation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Division&#039;&#039;&#039; of &#039;&#039;&#039;rotations&#039;&#039;&#039; has the effect of doing the rotation in the opposite direction, multiplying by a 330 degree &#039;&#039;&#039;rotation&#039;&#039;&#039; is the same as dividing by a 30 degree &#039;&#039;&#039;rotation&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Using Rotations ==&lt;br /&gt;
&lt;br /&gt;
You can access the individual components of a &#039;&#039;&#039;rotation&#039;&#039;&#039; &#039;&#039;&#039;R&#039;&#039;&#039; by &#039;&#039;&#039;R.x, R.y, R.z, &amp;amp; R.s&#039;&#039;&#039; (&#039;&#039;&#039;not&#039;&#039;&#039; R.w).  The scalar part R.s is the cosine of half the angle of rotation.  The vector part (R.x,R.y,R.z) is the product of the normalized axis of rotation and the sine of half the angle of rotation.  You can generate an inverse &#039;&#039;&#039;rotation&#039;&#039;&#039; by negating the x,y,z members (or by making the s value negative). As an aside, you can also use a &#039;&#039;&#039;rotation&#039;&#039;&#039; just as a repository of {{LSLG|float}} values, each &#039;&#039;&#039;rotation&#039;&#039;&#039; stores four of them and a {{LSLG|list}} consisting of &#039;&#039;&#039;rotation&#039;&#039;&#039; is more efficient than a {{LSLG|list}} consisting of {{LSLG|float}}s, but there is overhead in unpacking them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=0 cellspacing=0&lt;br /&gt;
|-&lt;br /&gt;
|rotation rot30X ||= {{LSLG|llEuler2Rot}}(&amp;lt;30, 0,0&amp;gt; * [[#DEG_TO_RAD|DEG_TO_RAD]] );||// Create a rotation constant&lt;br /&gt;
|-&lt;br /&gt;
|rotation rotCopy ||= rot30X;||// Just copy it into rotCopy, it copies all 4 float components&lt;br /&gt;
|-&lt;br /&gt;
|float X ||= rotCopy.x;||// Get out the individual components of the rotation&lt;br /&gt;
|-&lt;br /&gt;
|float Y ||= rotCopy.y;||&lt;br /&gt;
|-&lt;br /&gt;
|float Z ||= rotCopy.z;||&lt;br /&gt;
|-&lt;br /&gt;
|float S ||= rotCopy.s;||&lt;br /&gt;
|-&lt;br /&gt;
|rotation anotherCopy ||= &amp;lt;X, Y, Z, S&amp;gt;;||// Make another rotation out of the components&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There is a built in constant for a zero &#039;&#039;&#039;rotation&#039;&#039;&#039; [[#ZERO_ROTATION|ZERO_ROTATION]] which you can use directly or, if you need to invert a &#039;&#039;&#039;rotation R&#039;&#039;&#039;, divide [[#ZERO_ROTATION|ZERO_ROTATION]] by &#039;&#039;&#039;R&#039;&#039;&#039;. As a reminder from above, this works by first rotating to the zero position, then because it is a divide, rotating in the opposite sense to the original  &#039;&#039;&#039;rotation&#039;&#039;&#039;, thereby doing the inverse rotation.&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=0 cellspacing=0&lt;br /&gt;
|-&lt;br /&gt;
|rotation rot330X ||= &amp;lt;-rot30X.x, -rot30X.y, -rot30X.z, rot30X.s&amp;gt;;||// invert a rotation - NOTE the s component isn&#039;t negated&lt;br /&gt;
|-&lt;br /&gt;
|rotation another330X ||= [[#ZERO_ROTATION|ZERO_ROTATION]] / rot30X;||// invert a rotation by  division, same result as rot330X&lt;br /&gt;
|-&lt;br /&gt;
|rotation yetanother330X ||= &amp;lt;rot30X.x, rot30X.y, rot30X.z, -rot30X.s&amp;gt;;||// not literally the same but works the same.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Single or Root Prims vs Linked Prims vs Attachments ==&lt;br /&gt;
&lt;br /&gt;
The reason for talking about single or linked prim rotations is that for things like doors on vehicles, the desired motion is to move the door relative to the vehicle, no matter what the rotation of the overall vehicle is. While possible to do this with global rotations, it would quickly grow tedious.&lt;br /&gt;
There are generally three coordinate systems a prim can be in: all alone, part of a {{LSLG|linkset}}, or part of an {{LSLG|attachment}}. When a prim is alone, i.e., not part of a {{LSLG|linkset}}, it acts like a root prim; when it is part of an {{LSLG|attachment}}, it acts differently and is a bit broken.&lt;br /&gt;
&lt;br /&gt;
{{LSLRotGetSet}}&lt;br /&gt;
&lt;br /&gt;
==Rotating Vectors ==&lt;br /&gt;
&lt;br /&gt;
In LSL, rotating a {{LSLG|vector}} is very useful if you want to move an object in an arc or circle when the center of rotation isn&#039;t the center of the object.&lt;br /&gt;
&lt;br /&gt;
This sounds very complex, but there is much less here than meets the eye. Remember from the above discussion of rotating the [[#Combining Rotations|dart]], and replace the physical dart with a {{LSLG|vector}} whose origin is the tail of the dart, and whose components in X, Y, and Z describe the position of the tip of the dart. Rotating the dart around its tail moves the tip of the dart through and arc whose center of rotation is the tail of the dart. In exactly the same way, rotating a {{LSLG|vector}} which represents an offset from the center of a prim rotates the prim through the same arc. What this looks like is the object rotates around a position offset by the {{LSLG|vector}} from the center of the prim.&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=0 cellspacing=0&lt;br /&gt;
|-&lt;br /&gt;
|rotation rot30X ||= {{LSLG|llEuler2Rot}}(&amp;lt;30, 0,0&amp;gt; * [[#DEG_TO_RAD|DEG_TO_RAD]] );||// create a rotation constant, 30 degrees around the X axis&lt;br /&gt;
|-&lt;br /&gt;
|vector offset ||= &amp;lt;0, 1, 0&amp;gt;;||// create an offset one meter in the global positive Y direction&lt;br /&gt;
|-&lt;br /&gt;
|vector rotatedOffset || = offset * rot30X;||// rotate the offset to get the motion caused by the rotations&lt;br /&gt;
|-&lt;br /&gt;
|vector newPos || = {{LSLG|llGetPos}}() + rotatedOffset;||// move the prim position by the rotated offset amount&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Nota Bene:&#039;&#039;&#039; Doing this is a move, so don&#039;t forget about issues of moving a prim off world, below ground, more than 10 meters etc.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
=== [[ZERO_ROTATION]] ===&lt;br /&gt;
ZERO_ROTATION = &amp;lt;0.0, 0.0, 0.0, 1.0&amp;gt;;&amp;lt;br/&amp;gt;&lt;br /&gt;
A rotation constant representing a Euler angle of &amp;lt;0.0, 0.0, 0.0&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== [[DEG_TO_RAD]] ===&lt;br /&gt;
DEG_TO_RAD = 0.01745329238f;&amp;lt;br/&amp;gt;&lt;br /&gt;
A float constant that when multiplied by an angle in degrees gives the angle in radians.&lt;br /&gt;
&lt;br /&gt;
=== [[RAD_TO_DEG]] ===&lt;br /&gt;
RAD_TO_DEG = 57.29578f;&amp;lt;br/&amp;gt;&lt;br /&gt;
A float constant when multiplied by an angle in radians gives the angle in degrees.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:LSL_Types|Rotation]][[Category:LSL_Math]][[Category:LSL_Math/3D]][[Category:LSL_Constants]]&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Rotation&amp;diff=45974</id>
		<title>Rotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Rotation&amp;diff=45974"/>
		<updated>2007-12-24T21:40:09Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: Added order of rotation in Euler vectors discussion, combined Local vs World rotation paragraph with existing section.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Multi-lang}}&lt;br /&gt;
{{LSL Header}}{{RightToc}}&lt;br /&gt;
=Rotations=&lt;br /&gt;
The LSL &#039;&#039;&#039;rotation&#039;&#039;&#039; type is used to represent an orientation in 3D.  (Note that we try to write the type name in &#039;&#039;&#039;bold&#039;&#039;&#039;.)&lt;br /&gt;
An orientation, or 3D angle, is represented by a mathematical object called a {{LSLG|quaternion}}.  You can think of a quaternion as four numbers, three of which represent the direction an object is facing and a fourth that represents the object&#039;s banking left or right around that direction. The main advantage of using &lt;br /&gt;
quaternions is that they are not susceptible to [http://en.wikipedia.org/wiki/Gimbal_Lock gimbal lock]. &lt;br /&gt;
For the complex inner workings of quaternion mathematics, see {{LSLG|quaternion}}. &lt;br /&gt;
For a list of functions and events related to rotations see {{LSLG|Rotation Synopsis}}.&lt;br /&gt;
There is also information about causing  textures to rotate in {{LSLG|texture}}s.&lt;br /&gt;
&lt;br /&gt;
==Other representations==&lt;br /&gt;
Another way to represent a rotation is using three numbers, &amp;lt;X, Y, Z&amp;gt;, which represent the amount (in [[radians]]) which the object is rotated around each axis.  This is used in the Edit window, for example, and is generally easy for people to visualize.  Note that these three numbers are a &#039;&#039;&#039;vector&#039;&#039;&#039; and not a &#039;&#039;&#039;rotation&#039;&#039;&#039; type, though it can represent the same information.  This is called the &#039;&#039;Euler&#039;&#039; representation of a rotation.&lt;br /&gt;
  &lt;br /&gt;
A third way is to use three vectors, showing what the front is pointing at, what the top is pointing at, and what the left side is pointing at.  Actually, only two of the three are needed, because any two determines the third.  &lt;br /&gt;
&lt;br /&gt;
For good reasons, such as being able to combine rotations, the four number version, the &#039;&#039;&#039;rotation&#039;&#039;&#039;, is better, though harder for a beginner to grasp. Fortunately it&#039;s very seldom necessary to do anything with the actual internal representation of &#039;&#039;rotations&#039;&#039; and there are functions for converting easily back and forth.&lt;br /&gt;
&lt;br /&gt;
==Right hand rule==&lt;br /&gt;
In LSL all rotations are done according to the &#039;&#039;&#039;right hand rule&#039;&#039;&#039;. With your right hand, extend the first finger in the direction of the positive direction of the x-axis. Extend your second finger at right angles to your first finger, it will point along the positive y-axis, and your thumb, extended at right angles to both will point along the positive z-axis. When you&#039;re editing an object, the three colored axis arrows point in the positive direction for each axis (X: red, Y: green, Z: blue).&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Right_hand_rule&lt;br /&gt;
&lt;br /&gt;
Now, don&#039;t remove your right hand just yet, there is another use for it, determining the direction of a positive rotation. Make a fist with your right hand, thumb extended and pointing in the positive direction of the axis you are interested in. Your fingers curl around in the direction of positive rotation. Rotations around the X, Y, and Z axis are often referred to as Roll, Pitch, and Yaw, particularly for vehicles.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Tait-Bryan_angles Roll Pitch Yaw]&lt;br /&gt;
&lt;br /&gt;
== Combining Rotations ==&lt;br /&gt;
&lt;br /&gt;
To combine &#039;&#039;&#039;rotations&#039;&#039;&#039;, you use the &#039;&#039;&#039;multiply&#039;&#039;&#039; and &#039;&#039;&#039;divide&#039;&#039;&#039; operators. Don&#039;t try to use addition or subtraction operators on &#039;&#039;&#039;rotations&#039;&#039;&#039;, as they will not do what you expect. The &#039;&#039;&#039;multiply&#039;&#039;&#039; operation applies the rotation in the positive direction, the &#039;&#039;&#039;divide&#039;&#039;&#039; operation does a negative rotation. You can also negate a rotation directly, just negate the s component, e.g. X.s = -X.s.&lt;br /&gt;
&lt;br /&gt;
Unlike other types such as {{LSLG|float}}, the order in which the operations are done, &lt;br /&gt;
[http://en.wikipedia.org/wiki/Commutative non-commutative], is important.&lt;br /&gt;
The reason for this is simple: the order you do rotations in is important in RL. For example, if you had a dart with four feathers, started from rotation &amp;lt;0, 0, 0&amp;gt; with its tail on the origin, it would lie on the X axis with its point aimed in the positive X direction, its feathers along the Z and Y axes, and the axes of the dart and the axes of the world would be aligned. We&#039;re going to rotate it 45 degrees around X and 30 degrees around Y, but in different orders.&lt;br /&gt;
&lt;br /&gt;
First, after rotating 45 deg around X the dart would still be on the X axis, unmoved, just turned along its long axis, so the feathers would be at 45 deg to the axes. Then rotating 30 deg around Y would move it in the XZ plane to point down 30 deg from the X axis (remember the right hand rule for rotations means a small positive rotation around Y moves the point down). The dart winds up pointing 30 deg down, in the same vertical plane it started in, but turned around its own long axis so the feathers are no longer up and down.&lt;br /&gt;
&lt;br /&gt;
If you did it the other way, first rotating 30 deg in Y, the dart would rotate down in the XZ plane, but notice that it no longer is on the X axis; its X axis and the world&#039;s aren&#039;t aligned any more. Now a 45 degree rotation around the X axis would pivot the dart around its tail, the point following a 30 deg cone whose axis is along the positive world X axis, for 45 degrees up and to the right. If you were looking down the X axis, it would pivot from pointing 30 deg below the X axis, up and to the right, out of the XZ plane, to a point below the 1st quadrant in the XY plane, its feathers rotating as it went.&lt;br /&gt;
&lt;br /&gt;
Clearly this is a different result from the first rotation, but the order of rotation is the only thing changed.&lt;br /&gt;
&lt;br /&gt;
To do a constant rotation you need to define a &#039;&#039;&#039;rotation&#039;&#039;&#039; value which can be done by creating a {{LSLG|vector}} with the X, Y, Z angles in radians as components (called an Euler angle), then converting that to a &#039;&#039;&#039;rotation&#039;&#039;&#039; by using the {{LSLG|llEuler2Rot}} function. You can alternately create the native rotation directly: the real part is the cosine of half the angle of rotation, and the vector part is the normalized axis of rotation multiplied by the sine of half the angle of rotation. To go from a rotation to an Euler angle {{LSLG|vector}} use {{LSLG|llRot2Euler}}.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; angles in LSL are in radians, not degrees, but you can easily convert by using the built-in constants [[#RAD_TO_DEG|RAD_TO_DEG]] and [[#DEG_TO_RAD|DEG_TO_RAD]]. For a 30 degree &#039;&#039;&#039;rotation&#039;&#039;&#039; around the X axis you might use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=0 cellspacing=0&lt;br /&gt;
|-&lt;br /&gt;
|rotation rot30X ||= {{LSLG|llEuler2Rot}}(&amp;lt;30, 0,0&amp;gt; * DEG_TO_RAD);||// convert the degrees to radians, then convert that {{LSLG|vector}} into a rotation, rot30x&lt;br /&gt;
|-&lt;br /&gt;
|{{LSLG|vector}} vec30X ||= {{LSLG|llRot2Euler}}(rot30X );||// convert the rotation back to a {{LSLG|vector}} (the values will be in radians)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Order of rotation for Euler Vectors ==&lt;br /&gt;
&lt;br /&gt;
From the above discussion, it&#039;s clear that when dealing with rotations around more than one axis, the order they are done in is critical. In the &#039;&#039;Euler&#039;&#039; discussion above this was kind of glossed over a bit, the individual rotations around the three axis define an overall &#039;&#039;rotation&#039;&#039;, but that begs the question: What axis order are the rotations done in? The answer is &#039;&#039;&#039;Z, Y, X&#039;&#039;&#039; in global coordinates. If you are trying to rotate an object around more than one axis at a time using the &#039;&#039;Euler&#039;&#039; representation, determine the correct &#039;&#039;Euler&#039;&#039; {{LSLG|vector}} using the Z, Y, X rotation order, then use the {{LSLG|llEuler2Rot}} function to get the &#039;&#039;&#039;rotation&#039;&#039;&#039; for use in combining rotations or applying the rotation to the object.&lt;br /&gt;
&lt;br /&gt;
== Local vs Global (World) rotations ==&lt;br /&gt;
&lt;br /&gt;
It is important to distinguish between the &#039;&#039;&#039;rotation&#039;&#039;&#039; relative to the world, and the &#039;&#039;&#039;rotation&#039;&#039;&#039; relative to the local object itself.  In the editor, you can switch back and forth from one to the other.  In a script, you must convert from one to the other to get the desired behavior.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Local&#039;&#039;&#039; rotations are ones done around the axes embedded in the object itself forward/back, left/right, up/down, irrespective of how the object is rotated in the world. &#039;&#039;&#039;Global&#039;&#039;&#039; rotations are ones done around the world axes, North/South, East/West, Higher/Lower. You can see the difference by rotating a prim, then edit it and change the axes settings between local and global, notice how the colored axes arrows change.&lt;br /&gt;
&lt;br /&gt;
In LSL, the difference between doing a &#039;&#039;&#039;local&#039;&#039;&#039; or &#039;&#039;&#039;global&#039;&#039;&#039; rotation is the order the &#039;&#039;&#039;rotations&#039;&#039;&#039; are evaluated in the statement.&lt;br /&gt;
&lt;br /&gt;
This does a &#039;&#039;&#039;local&#039;&#039;&#039; rotation by putting the constant 30 degree &#039;&#039;&#039;rotation&#039;&#039;&#039; to the left of the object&#039;s &#039;&#039;&#039;rotation&#039;&#039;&#039;. It is like the first operation in the first example above, just twisting the dart around its own long axis.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=0 cellspacing=0&lt;br /&gt;
|-&lt;br /&gt;
|rotation localRot = ||rot30X * myRot;||// do a local rotation by multiplying a constant rotation by a world rotation&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To do a &#039;&#039;&#039;global&#039;&#039;&#039; rotation, use the same &#039;&#039;&#039;rotation&#039;&#039;&#039; values, but in the opposite order. This is like the second operation in the second example, the dart rotating up and to the right around the world X axis.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=0 cellspacing=0&lt;br /&gt;
|-&lt;br /&gt;
|rotation globalRot || = myRot * rot30X;||// do a global rotation by multiplying a world rotation by a constant rotation&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Another way to think about combining rotations ==&lt;br /&gt;
&lt;br /&gt;
You may want to think about this &#039;&#039;&#039;local&#039;&#039;&#039; vs &#039;&#039;&#039;global&#039;&#039;&#039; difference by considering that &#039;&#039;&#039;rotations&#039;&#039;&#039; are done in evaluation order, that is left to right except for parenthesized expressions.&lt;br /&gt;
&lt;br /&gt;
In the localRot case, what happened was that starting from &amp;lt;0, 0, 0&amp;gt;, the rot30X was done first, rotating the prim around the world X axis, but since when it&#039;s unrotated, the local and global axes are identical it has the effect of doing the rotation around the object&#039;s local X axis. Then the second &#039;&#039;&#039;rotation&#039;&#039;&#039; myRot was done which rotated the prim to its original rotation, but now with the additional X axis rotation baked in. What this looks like is that the prim rotated in place around its own X axis, a &#039;&#039;&#039;local&#039;&#039;&#039; rotation.&lt;br /&gt;
&lt;br /&gt;
In the globalRot case, again starting from &amp;lt;0, 0, 0&amp;gt;, first the object is rotated to its original rotation, but the object&#039;s axes and the world&#039;s axes are no longer aligned! So, now the second &#039;&#039;&#039;rotation&#039;&#039;&#039; rot30x does exactly what it did in the local case, rotates the object 30 degrees around the world X axis, but the effect is to rotate the object through a cone around the world X axis since the object&#039;s X axis and the world&#039;s X axis aren&#039;t the same this time. What this looks like is that the prim pivoted 30 degrees around the world X axis, hence a &#039;&#039;&#039;global&#039;&#039;&#039; rotation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Division&#039;&#039;&#039; of &#039;&#039;&#039;rotations&#039;&#039;&#039; has the effect of doing the rotation in the opposite direction, multiplying by a 330 degree &#039;&#039;&#039;rotation&#039;&#039;&#039; is the same as dividing by a 30 degree &#039;&#039;&#039;rotation&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Using Rotations ==&lt;br /&gt;
&lt;br /&gt;
You can access the individual components of a &#039;&#039;&#039;rotation&#039;&#039;&#039; &#039;&#039;&#039;R&#039;&#039;&#039; by &#039;&#039;&#039;R.x, R.y, R.z, &amp;amp; R.s&#039;&#039;&#039; (&#039;&#039;&#039;not&#039;&#039;&#039; R.w).  The scalar part R.s is the cosine of half the angle of rotation.  The vector part (R.x,R.y,R.z) is the product of the normalized axis of rotation and the sine of half the angle of rotation.  You can generate an inverse &#039;&#039;&#039;rotation&#039;&#039;&#039; by negating the x,y,z members (or by making the s value negative). As an aside, you can also use a &#039;&#039;&#039;rotation&#039;&#039;&#039; just as a repository of {{LSLG|float}} values, each &#039;&#039;&#039;rotation&#039;&#039;&#039; stores four of them and a {{LSLG|list}} consisting of &#039;&#039;&#039;rotation&#039;&#039;&#039; is more efficient than a {{LSLG|list}} consisting of {{LSLG|float}}s, but there is overhead in unpacking them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=0 cellspacing=0&lt;br /&gt;
|-&lt;br /&gt;
|rotation rot30X ||= {{LSLG|llEuler2Rot}}(&amp;lt;30, 0,0&amp;gt; * [[#DEG_TO_RAD|DEG_TO_RAD]] );||// Create a rotation constant&lt;br /&gt;
|-&lt;br /&gt;
|rotation rotCopy ||= rot30X;||// Just copy it into rotCopy, it copies all 4 float components&lt;br /&gt;
|-&lt;br /&gt;
|float X ||= rotCopy.x;||// Get out the individual components of the rotation&lt;br /&gt;
|-&lt;br /&gt;
|float Y ||= rotCopy.y;||&lt;br /&gt;
|-&lt;br /&gt;
|float Z ||= rotCopy.z;||&lt;br /&gt;
|-&lt;br /&gt;
|float S ||= rotCopy.s;||&lt;br /&gt;
|-&lt;br /&gt;
|rotation anotherCopy ||= &amp;lt;X, Y, Z, S&amp;gt;;||// Make another rotation out of the components&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There is a built in constant for a zero &#039;&#039;&#039;rotation&#039;&#039;&#039; [[#ZERO_ROTATION|ZERO_ROTATION]] which you can use directly or, if you need to invert a &#039;&#039;&#039;rotation R&#039;&#039;&#039;, divide [[#ZERO_ROTATION|ZERO_ROTATION]] by &#039;&#039;&#039;R&#039;&#039;&#039;. As a reminder from above, this works by first rotating to the zero position, then because it is a divide, rotating in the opposite sense to the original  &#039;&#039;&#039;rotation&#039;&#039;&#039;, thereby doing the inverse rotation.&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=0 cellspacing=0&lt;br /&gt;
|-&lt;br /&gt;
|rotation rot330X ||= &amp;lt;-rot30X.x, -rot30X.y, -rot30X.z, rot30X.s&amp;gt;;||// invert a rotation - NOTE the s component isn&#039;t negated&lt;br /&gt;
|-&lt;br /&gt;
|rotation another330X ||= [[#ZERO_ROTATION|ZERO_ROTATION]] / rot30X;||// invert a rotation by  division, same result as rot330X&lt;br /&gt;
|-&lt;br /&gt;
|rotation yetanother330X ||= &amp;lt;rot30X.x, rot30X.y, rot30X.z, -rot30X.s&amp;gt;;||// not literally the same but works the same.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Single or Root Prims vs Linked Prims vs Attachments ==&lt;br /&gt;
&lt;br /&gt;
The reason for talking about single or linked prim rotations is that for things like doors on vehicles, the desired motion is to move the door relative to the vehicle, no matter what the rotation of the overall vehicle is. While possible to do this with global rotations, it would quickly grow tedious.&lt;br /&gt;
There are generally three coordinate systems a prim can be in: all alone, part of a {{LSLG|linkset}}, or part of an {{LSLG|attachment}}. When a prim is alone, i.e., not part of a {{LSLG|linkset}}, it acts like a root prim; when it is part of an {{LSLG|attachment}}, it acts differently and is a bit broken.&lt;br /&gt;
&lt;br /&gt;
{{LSLRotGetSet}}&lt;br /&gt;
&lt;br /&gt;
==Rotating Vectors ==&lt;br /&gt;
&lt;br /&gt;
In LSL, rotating a {{LSLG|vector}} is very useful if you want to move an object in an arc or circle when the center of rotation isn&#039;t the center of the object.&lt;br /&gt;
&lt;br /&gt;
This sounds very complex, but there is much less here than meets the eye. Remember from the above discussion of rotating the [[#Combining Rotations|dart]], and replace the physical dart with a {{LSLG|vector}} whose origin is the tail of the dart, and whose components in X, Y, and Z describe the position of the tip of the dart. Rotating the dart around its tail moves the tip of the dart through and arc whose center of rotation is the tail of the dart. In exactly the same way, rotating a {{LSLG|vector}} which represents an offset from the center of a prim rotates the prim through the same arc. What this looks like is the object rotates around a position offset by the {{LSLG|vector}} from the center of the prim.&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=0 cellspacing=0&lt;br /&gt;
|-&lt;br /&gt;
|rotation rot30X ||= {{LSLG|llEuler2Rot}}(&amp;lt;30, 0,0&amp;gt; * [[#DEG_TO_RAD|DEG_TO_RAD]] );||// create a rotation constant, 30 degrees around the X axis&lt;br /&gt;
|-&lt;br /&gt;
|vector offset ||= &amp;lt;0, 1, 0&amp;gt;;||// create an offset one meter in the global positive Y direction&lt;br /&gt;
|-&lt;br /&gt;
|vector rotatedOffset || = offset * rot30X;||// rotate the offset to get the motion caused by the rotations&lt;br /&gt;
|-&lt;br /&gt;
|vector newPos || = {{LSLG|llGetPos}}() + rotatedOffset;||// move the prim position by the rotated offset amount&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Nota Bene:&#039;&#039;&#039; Doing this is a move, so don&#039;t forget about issues of moving a prim off world, below ground, more than 10 meters etc.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
=== [[ZERO_ROTATION]] ===&lt;br /&gt;
ZERO_ROTATION = &amp;lt;0.0, 0.0, 0.0, 1.0&amp;gt;;&amp;lt;br/&amp;gt;&lt;br /&gt;
A rotation constant representing a Euler angle of &amp;lt;0.0, 0.0, 0.0&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== [[DEG_TO_RAD]] ===&lt;br /&gt;
DEG_TO_RAD = 0.01745329238f;&amp;lt;br/&amp;gt;&lt;br /&gt;
A float constant that when multiplied by an angle in degrees gives the angle in radians.&lt;br /&gt;
&lt;br /&gt;
=== [[RAD_TO_DEG]] ===&lt;br /&gt;
RAD_TO_DEG = 57.29578f;&amp;lt;br/&amp;gt;&lt;br /&gt;
A float constant when multiplied by an angle in radians gives the angle in degrees.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:LSL_Types|Rotation]][[Category:LSL_Math]][[Category:LSL_Math/3D]][[Category:LSL_Constants]]&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlLookAt&amp;diff=34622</id>
		<title>LlLookAt</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlLookAt&amp;diff=34622"/>
		<updated>2007-10-07T16:21:43Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Function/damping|damping}}{{LSL_Function&lt;br /&gt;
|func_id=105|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llLookAt|p1_type=vector|p1_name=target|p2_type=float|p2_name=strength|p3_type=float|p3_name=damping&lt;br /&gt;
|func_footnote=To stop the object from maintaining the &#039;&#039;&#039;target&#039;&#039;&#039; positions use {{LSLG|llStopLookAt}}&amp;lt;br/&amp;gt;&lt;br /&gt;
To change the position in the same manner use {{LSLG|llMoveToTarget}}.&lt;br /&gt;
|func_desc=Cause object name to point its &#039;&#039;&#039;up&#039;&#039;&#039; axis (positive z) towards &#039;&#039;&#039;target&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If the object isn&#039;t physical, the settings don&#039;t seem to have any effect except the force must be &amp;gt; 0. For physical objects, the strength seems to be something like viscosity, not the rotating strength, so the weaker it is the faster the rotation happens. The damping value controls how fast the rotation damps out. Low values relative to the strength make it bouncy, often overshooting the target, high values sluggish. The strength and damping values seem to have no relation to the mass of the object.&lt;br /&gt;
&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=This does not guarantee that physical objects will wind up pointing at the target. Depending on the shape of the object, the strength and the damping, it may well settle out at a different rotation pointing in a different direction if the damping stops the rotation before the final position is reached.&lt;br /&gt;
&lt;br /&gt;
If the object is physical and not symmetrical it may cause a recoil effect where the object winds up drifting away from it&#039;s original position as well as making the final rotation it settles on less accurate.&lt;br /&gt;
|constants&lt;br /&gt;
|examples&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=*{{LSLG|llRotLookAt}}&lt;br /&gt;
|also_events&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|permission&lt;br /&gt;
|negative_index&lt;br /&gt;
|sort=LookAt&lt;br /&gt;
|cat1=Physics&lt;br /&gt;
|cat2=Target&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlLookAt&amp;diff=34549</id>
		<title>LlLookAt</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlLookAt&amp;diff=34549"/>
		<updated>2007-10-07T03:24:26Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Function/damping|damping}}{{LSL_Function&lt;br /&gt;
|func_id=105|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llLookAt|p1_type=vector|p1_name=target|p2_type=float|p2_name=strength|p3_type=float|p3_name=damping&lt;br /&gt;
|func_footnote=To stop the object from maintaining the &#039;&#039;&#039;target&#039;&#039;&#039; positions use {{LSLG|llStopLookAt}}&amp;lt;br/&amp;gt;&lt;br /&gt;
To change the position in the same manner use {{LSLG|llMoveToTarget}}.&lt;br /&gt;
|func_desc=Cause object name to point its &#039;&#039;&#039;up&#039;&#039;&#039; axis (positive z) towards &#039;&#039;&#039;target&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If the object isn&#039;t physical, the settings don&#039;t seem to have any effect except the force must be &amp;gt; 0. For physical objects, the strength seems to be something like viscosity, not the rotating strength, so the weaker it is the faster the rotation happens. The damping value controls how fast the rotation damps out. Low values relative to the strength make it bouncy, high values more damped. The strength and tau values seem to have no relation to the mass of the object.&lt;br /&gt;
&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=This does not guarantee that physical objects will wind up pointing at the target. Depending on the shape of the object, the strength and the tau, it may well settle out at a different rotation pointing in a different direction.&lt;br /&gt;
&lt;br /&gt;
If the object is physical and not symmetrical it may cause a recoil effect where the object winds up drifting away from it&#039;s original position as well as making the final rotation it settles on less accurate.&lt;br /&gt;
|constants&lt;br /&gt;
|examples&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=*{{LSLG|llRotLookAt}}&lt;br /&gt;
|also_events&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|permission&lt;br /&gt;
|negative_index&lt;br /&gt;
|sort=LookAt&lt;br /&gt;
|cat1=Physics&lt;br /&gt;
|cat2=Target&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlLookAt&amp;diff=34383</id>
		<title>LlLookAt</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlLookAt&amp;diff=34383"/>
		<updated>2007-10-05T05:44:14Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Function/damping|damping}}{{LSL_Function&lt;br /&gt;
|func_id=105|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llLookAt|p1_type=vector|p1_name=target|p2_type=float|p2_name=strength|p3_type=float|p3_name=damping&lt;br /&gt;
|func_footnote=To stop the object from maintaining the &#039;&#039;&#039;target&#039;&#039;&#039; positions use {{LSLG|llStopLookAt}}&amp;lt;br/&amp;gt;&lt;br /&gt;
To change the position in the same manner use {{LSLG|llMoveToTarget}}.&lt;br /&gt;
|func_desc=Cause object name to point its &#039;&#039;&#039;up&#039;&#039;&#039; axis (positive z) towards &#039;&#039;&#039;target&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If the object isn&#039;t physical, the settings don&#039;t seem to have any effect except the force must be &amp;gt; 0. For physical objects, the strength seems to be the damping strength, not the rotating strength, so the weaker it is the faster the rotation happens. The tau controls how fast the rotation damps out. Low values relative to the strength make it bouncy, high values more viscous motion.&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=If the object is physical and not symmetrical it may cause a recoil effect.&lt;br /&gt;
|constants&lt;br /&gt;
|examples&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=*{{LSLG|llRotLookAt}}&lt;br /&gt;
|also_events&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|permission&lt;br /&gt;
|negative_index&lt;br /&gt;
|sort=LookAt&lt;br /&gt;
|cat1=Physics&lt;br /&gt;
|cat2=Target&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSetText&amp;diff=33668</id>
		<title>LlSetText</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSetText&amp;diff=33668"/>
		<updated>2007-09-29T16:33:11Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: Prim catagory&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=152&lt;br /&gt;
|func_sleep=0.0&lt;br /&gt;
|func_energy=10.0&lt;br /&gt;
|func=llSetText&lt;br /&gt;
|sort=SetText&lt;br /&gt;
|p1_type=string|p1_name=text|p1_desc=text to display between the quotes&lt;br /&gt;
|p2_type=vector|p2_name=color&lt;br /&gt;
|p3_type=float|p3_name=alpha&lt;br /&gt;
|func_desc=Displays &#039;&#039;&#039;text&#039;&#039;&#039; over a prim with specific &#039;&#039;&#039;color&#039;&#039;&#039; and transparency (specified with &#039;&#039;&#039;alpha&#039;&#039;&#039;).&lt;br /&gt;
|return_text&lt;br /&gt;
|spec=&lt;br /&gt;
|caveats=*The floating text is a property of the prim and not the script, thus the text will remain if the script is deactivated or removed.&lt;br /&gt;
**To remove floating text, one must assign an empty string with llSetText(&amp;quot;&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;, 1.0);&lt;br /&gt;
*Vertical whitespace is removed from the end of the text string, so if you want vertical whitespace put any character (like a space) on the last line.&lt;br /&gt;
**Bad: llSetText(&amp;quot;Monkeys\n\n\n\n\n&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;, 1.0);&lt;br /&gt;
**Good: llSetText(&amp;quot;Monkeys\n\n\n\n\n &amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;, 1.0);&lt;br /&gt;
|examples=&lt;br /&gt;
Example colors:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vector white = &amp;lt;1.0, 1.0, 1.0&amp;gt;;&lt;br /&gt;
vector red = &amp;lt;1.0, 0.0, 0.0&amp;gt;;&lt;br /&gt;
vector green = &amp;lt;0.0, 1.0, 0.0&amp;gt;;&lt;br /&gt;
vector blue = &amp;lt;0.0, 0.0, 1.0&amp;gt;;&lt;br /&gt;
vector grey = &amp;lt;0.5, 0.5, 0.5&amp;gt;;&lt;br /&gt;
vector black = &amp;lt;0.0, 0.0, 0.0&amp;gt;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetText(&amp;quot;I am on&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;, 1.0);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;1.0, 1.0, 1.0&amp;gt; represents the values for red, green, and blue. &amp;lt;1.0, 1.0, 1.0&amp;gt;, means &amp;quot;white&amp;quot; and &amp;lt;0.0, 0.0, 0.0&amp;gt; means &amp;quot;black&amp;quot;. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetText(&amp;quot;I am off&amp;quot;, &amp;lt;0.0, 0.0, 0.0&amp;gt;, 1.0);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible). &lt;br /&gt;
&lt;br /&gt;
Example of how llSetText could be included in default code:&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
          llSay(0, &amp;quot;Hello, Avatar!&amp;quot;);&lt;br /&gt;
          llSetText(&amp;quot;Prize Box&amp;quot;, &amp;lt;0.0, 1.0, 0.0&amp;gt;, 1.0);&lt;br /&gt;
     }&lt;br /&gt;
 &lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
          llSay(0, &amp;quot;Touched.&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
By default the floating text will appear on a single line. However, the floating text can be spread over multiple lines by using a line break &amp;quot;\n&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     llSetText(&amp;quot;I am \n on two lines!&amp;quot;, &amp;lt;0.0, 1.0, 0.0&amp;gt;, 1.0);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions&lt;br /&gt;
|also&lt;br /&gt;
&lt;br /&gt;
|cat1=Effects&lt;br /&gt;
|cat2=Prim&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSetText&amp;diff=33667</id>
		<title>LlSetText</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSetText&amp;diff=33667"/>
		<updated>2007-09-29T16:29:13Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: Removed extra LSL function calls to try to get it to index correctly&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=152&lt;br /&gt;
|func_sleep=0.0&lt;br /&gt;
|func_energy=10.0&lt;br /&gt;
|func=llSetText&lt;br /&gt;
|sort=SetText&lt;br /&gt;
|p1_type=string|p1_name=text|p1_desc=text to display between the quotes&lt;br /&gt;
|p2_type=vector|p2_name=color&lt;br /&gt;
|p3_type=float|p3_name=alpha&lt;br /&gt;
|func_desc=Displays &#039;&#039;&#039;text&#039;&#039;&#039; over a prim with specific &#039;&#039;&#039;color&#039;&#039;&#039; and transparency (specified with &#039;&#039;&#039;alpha&#039;&#039;&#039;).&lt;br /&gt;
|return_text&lt;br /&gt;
|spec=&lt;br /&gt;
|caveats=*The floating text is a property of the prim and not the script, thus the text will remain if the script is deactivated or removed.&lt;br /&gt;
**To remove floating text, one must assign an empty string with llSetText(&amp;quot;&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;, 1.0);&lt;br /&gt;
*Vertical whitespace is removed from the end of the text string, so if you want vertical whitespace put any character (like a space) on the last line.&lt;br /&gt;
**Bad: llSetText(&amp;quot;Monkeys\n\n\n\n\n&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;, 1.0);&lt;br /&gt;
**Good: llSetText(&amp;quot;Monkeys\n\n\n\n\n &amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;, 1.0);&lt;br /&gt;
|examples=&lt;br /&gt;
Example colors:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vector white = &amp;lt;1.0, 1.0, 1.0&amp;gt;;&lt;br /&gt;
vector red = &amp;lt;1.0, 0.0, 0.0&amp;gt;;&lt;br /&gt;
vector green = &amp;lt;0.0, 1.0, 0.0&amp;gt;;&lt;br /&gt;
vector blue = &amp;lt;0.0, 0.0, 1.0&amp;gt;;&lt;br /&gt;
vector grey = &amp;lt;0.5, 0.5, 0.5&amp;gt;;&lt;br /&gt;
vector black = &amp;lt;0.0, 0.0, 0.0&amp;gt;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetText(&amp;quot;I am on&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;, 1.0);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;1.0, 1.0, 1.0&amp;gt; represents the values for red, green, and blue. &amp;lt;1.0, 1.0, 1.0&amp;gt;, means &amp;quot;white&amp;quot; and &amp;lt;0.0, 0.0, 0.0&amp;gt; means &amp;quot;black&amp;quot;. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetText(&amp;quot;I am off&amp;quot;, &amp;lt;0.0, 0.0, 0.0&amp;gt;, 1.0);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible). &lt;br /&gt;
&lt;br /&gt;
Example of how llSetText could be included in default code:&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
          llSay(0, &amp;quot;Hello, Avatar!&amp;quot;);&lt;br /&gt;
          llSetText(&amp;quot;Prize Box&amp;quot;, &amp;lt;0.0, 1.0, 0.0&amp;gt;, 1.0);&lt;br /&gt;
     }&lt;br /&gt;
 &lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
          llSay(0, &amp;quot;Touched.&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
By default the floating text will appear on a single line. However, the floating text can be spread over multiple lines by using a line break &amp;quot;\n&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     llSetText(&amp;quot;I am \n on two lines!&amp;quot;, &amp;lt;0.0, 1.0, 0.0&amp;gt;, 1.0);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions&lt;br /&gt;
|also&lt;br /&gt;
&lt;br /&gt;
|cat1=Effects&lt;br /&gt;
|cat2&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Tree_Kyomoon/Use_Cases&amp;diff=33338</id>
		<title>User:Tree Kyomoon/Use Cases</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Tree_Kyomoon/Use_Cases&amp;diff=33338"/>
		<updated>2007-09-28T01:24:57Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Login-less Viewing of Regions==&lt;br /&gt;
&lt;br /&gt;
I (and I am sure others before me) had proposed a login-less grid viewer for example, where interactive/non interactive 3d models and environments within second life could be viewed from a web browser or hardware device without requiring the presence of an avatar.  It is my hope that this kind of extensibility will enable developers in world to utilize the grid as a platform for web content that could be embedded in any webpage like videos on youtube or mini apps on facebook.  Based on what I saw it seems that this kind of application could be possible.&lt;br /&gt;
&lt;br /&gt;
==Rich Internet Application Development==&lt;br /&gt;
&lt;br /&gt;
I have also made several proposals that would make the grid more rich internet application development capable, such as support for [[User:Zero_Linden/Office_Hours/Discussion#llHTTPRequest.28.29| cookies in the llHTTPRequest]] or similar LSL function, and an object oriented language supporting actual objects and arrays similar to how they are in flash.  I think that this will greatly increase the ability for the massive Flash development community to quickly realize their skills in the 3d world of SL, rather than being stuck with 2d in flash for GUI and content/game dev.&lt;br /&gt;
&lt;br /&gt;
==E-Learning==&lt;br /&gt;
&lt;br /&gt;
E-Learning (Web Based Training or WBT) is usually delivered to large corporations via a Learning Management System that usually serves at least three purposes, one to limit access to a certain group of people,  two to distribute content to those people under a particular schedule or course, and three to track the progress and performance of those people (learners).  Literally millions of corporate employees worldwide log into some kind of learning management system every day to take what usually amounts to html based &amp;quot;page turner&amp;quot; courses.  I believe that there is a huge market potential to utilize existing LMS reporting and back end user / content management tools that already exist and make much of that content available with vast enhancement on the SL Grid, and feel that cookie support for the llHTTPRequest script is very central to that possiblity, as well as the R.I.A. enhancements described above.&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
If it were possible to write arbitrarily complex scripts I&#039;d think there&#039;d be a huge market for 3D training courses to produce much more interesting and richer learning environments, not to mention obvious 3D applications like machinery and plant maintenance. Except for the simplest cases though, this will only work with orders of magnitude more scripting capability - 50 to 1000 times more I&#039;d think. Lowering the SL learning curve, grid reliability and guaranteed responsiveness would be key to this and many other corporate applications too. --[[User:Ralph Doctorow|Ralph Doctorow]] 18:24, 27 September 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
[[Category:Architecture Working Group]]&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LSL_Editing_Primer&amp;diff=33155</id>
		<title>Talk:LSL Editing Primer</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LSL_Editing_Primer&amp;diff=33155"/>
		<updated>2007-09-27T15:07:38Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Code Tag? ==&lt;br /&gt;
What&#039;s the suggested tag for code examples? I tried &amp;lt;nowiki&amp;gt; &amp;lt;lsl&amp;gt;&amp;lt;/lsl&amp;gt; but it doesn&#039;t seem to work so I&#039;ve been using &amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt; but it&#039;s not great. --[[User:Ralph Doctorow|Ralph Doctorow]] 20:42, 26 September 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
Well, &amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt; is the common tag for code. For very short code samples you can use &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
What are you missing? Code highlighting? It&#039;s not available yet, AFAIK.&amp;lt;br/&amp;gt;&lt;br /&gt;
--[[User:Huney Jewell|Huney Jewell]] 03:04, 27 September 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt; the font is too small and you can&#039;t put links into the code and it would be nice to have code all tagged the same way so it could be automatically reformatted. &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;/nowiki&amp;gt; doesn&#039;t keep line breaks and also has a small point size. --[[User:Ralph Doctorow|Ralph Doctorow]] 08:07, 27 September 2007 (PDT)&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LSL_Editing_Primer&amp;diff=33154</id>
		<title>Talk:LSL Editing Primer</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LSL_Editing_Primer&amp;diff=33154"/>
		<updated>2007-09-27T15:06:32Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Code Tag? ==&lt;br /&gt;
What&#039;s the suggested tag for code examples? I tried &amp;lt;nowiki&amp;gt; &amp;lt;lsl&amp;gt;&amp;lt;/lsl&amp;gt; but it doesn&#039;t seem to work so I&#039;ve been using &amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt; but it&#039;s not great. --[[User:Ralph Doctorow|Ralph Doctorow]] 20:42, 26 September 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
Well, &amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt; is the common tag for code. For very short code samples you can use &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
What are you missing? Code highlighting? It&#039;s not available yet, AFAIK.&amp;lt;br/&amp;gt;&lt;br /&gt;
--[[User:Huney Jewell|Huney Jewell]] 03:04, 27 September 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt; the font is too small and you can&#039;t put links into the code and it would be nice to have code all tagged the same way so it could be automatically reformatted. &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;/nowiki&amp;gt; doesn&#039;t keep line breaks and also has a small point size. &lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LSL_Editing_Primer&amp;diff=33077</id>
		<title>Talk:LSL Editing Primer</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LSL_Editing_Primer&amp;diff=33077"/>
		<updated>2007-09-27T03:42:11Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: New page: == Code Tag? == What&amp;#039;s the suggested tag for code examples? I tried &amp;lt;nowiki&amp;gt; &amp;lt;lsl&amp;gt;&amp;lt;/lsl&amp;gt; but it doesn&amp;#039;t seem to work so I&amp;#039;ve been using &amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt; but it&amp;#039;s not great. --~~~~&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Code Tag? ==&lt;br /&gt;
What&#039;s the suggested tag for code examples? I tried &amp;lt;nowiki&amp;gt; &amp;lt;lsl&amp;gt;&amp;lt;/lsl&amp;gt; but it doesn&#039;t seem to work so I&#039;ve been using &amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt; but it&#039;s not great. --[[User:Ralph Doctorow|Ralph Doctorow]] 20:42, 26 September 2007 (PDT)&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LSL_Portal&amp;diff=33051</id>
		<title>Talk:LSL Portal</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LSL_Portal&amp;diff=33051"/>
		<updated>2007-09-27T00:28:01Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}{{Talk}}&lt;br /&gt;
= Please do not copy content from LSLwiki =&lt;br /&gt;
&lt;br /&gt;
From [http://forums.secondlife.com/showpost.php?p=1392697&amp;amp;postcount=44 Rob Linden&#039;s post to the forum]:&lt;br /&gt;
:Hi folks, sorry for dropping into this conversation late. I haven&#039;t read through everything here, but I&#039;d like to present an alternative.&lt;br /&gt;
&lt;br /&gt;
:There have been several requests that Linden Lab take on the hosting of the LSL wiki. There are several problems with us doing this work. The primary problem is the question of ownership of the material. Since, to the best of our knowledge, there was never an explicit, consistent notice of ownership of this material throughout its creation, nor a clear assignment/license associated with contributing more material, it would seem the only safe way to license this content would be to contact every single contributor throughout the life of the wiki and get an explicit license or copyright assignment from them. Note that I said &amp;quot;safe&amp;quot;, not &amp;quot;practical&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:We&#039;re not in a position to go down that road. However, we do have wiki.secondlife.com, which has had, since day one, a very clear notice about the license under which contributions are made and distributed. We would be very happy to see the community collaborate on newly created content on wiki.secondlife.com. As long as you author the content (not cut and paste from sources you are not the sole author of), we welcome your contribution. -- [[User:Rob Linden|Rob Linden]] 14:30, 24 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
OK, so let&#039;s talk about formatting rules for entries.&lt;br /&gt;
&lt;br /&gt;
(Moved to [[LSL Portal Guidelines]], so that this talk doesn&#039;t get too cluttered.) -- [[User:Talarus Luan|Talarus Luan]] 16:32, 24 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
[[User:Talarus Luan|Talarus Luan]] 14:28, 24 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=Other Discussion=&lt;br /&gt;
&lt;br /&gt;
Should we make this the front page to the LSL reference, or put that one more level down?  I kinda lean toward the former.  [[User:Gigs Taggart|Gigs Taggart]] 14:09, 24 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Yeah i think so... (Unsigned by Dimentox Travanti}&lt;br /&gt;
:Remember to sign your post with four tildes. [[User:Gigs Taggart|Gigs Taggart]] 14:26, 24 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I used a modified version of the [http://meta.wikimedia.org/wiki/User:Ajqnic:GeSHiHighlight GeSHiHighlight] plugin for MediaWiki.  With an LSL syntax file.  The license for the plugin and for [http://qbnz.com/highlighter/ GeSHi] is GPL, it also requires another plugin [http://meta.wikimedia.org/wiki/User:Ajqnic:purgePage purgePage].&lt;br /&gt;
--[[User:Thraxis Epsilon|Thraxis Epsilon]] 15:00, 24 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== Regarding copying content from the existing Wiki ==&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t clear from Rob&#039;s post, but it should be made clear: we CAN copy our OWN content from the existing wiki. IE, I plan to copy/paste my XML-RPC notes from the existing one. Does that present an issue? If so, why?&lt;br /&gt;
[[User:Talarus Luan|Talarus Luan]] 16:03, 24 January 2007 (PST)&lt;br /&gt;
:If you are the sole author, it wouldn&#039;t.  Just be careful and check the page history.   [[User:Gigs Taggart|Gigs Taggart]] 16:10, 24 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== Syntax Highlighting ==&lt;br /&gt;
&lt;br /&gt;
Updated info on the syntax highlighting is available here [[http://rpgstats.com/wiki/index.php?title=GeSHiHiLight.php GeSHiHiLight]]&lt;br /&gt;
--[[User:Thraxis Epsilon|Thraxis Epsilon]] 16:10, 24 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
:Lets hope they include it soon ^^ [[User:Strife Onizuka|Strife Onizuka]] 21:21, 24 January 2007 (PST)&lt;br /&gt;
:Is there anyone we can ask? [[User:Dimentox Travanti|Dimentox Travanti]] 10:50, 25 January 2007 (PST)&lt;br /&gt;
:any news or update on this? [[User:Blueman Steele|Blueman Steele]] 6:12, 10 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
::We tried to use start using this on Thursday, but ran into some problems.  Thraxis, it&#039;ll help if you can contact me privately to discuss some of the issues. -- [[User:Rob Linden|Rob Linden]] 00:37, 11 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
:What&#039;s the status of syntax highlighting? --[[User:Mokelembembe Mokeev|Mokelembembe Mokeev]] 15:11, 24 April 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
::No one has made any efforts recently to get the highlighter included in the wiki. If you are going to post highlighted code, it would be good to have it output in such a way that keywords link to their appropriate pages. -- [[User:Strife Onizuka|Strife Onizuka]] 16:53, 24 April 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
:Talked with Rob Liden - The concern with the script is about security and the possiblity of injecting PHP code into the script hilighting. Since its a possible security issue he would like somebody at Linden to look into and fix it. I&#039;m going to look into the script and tell Rob what I found also. --[[User:Mokelembembe Mokeev|Mokelembembe Mokeev]] 15:29, 4 May 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Let&#039;s refer to this simply as the &amp;quot;LSL portal&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
Since there&#039;s already something out there called the &amp;quot;LSLwiki&amp;quot;, let&#039;s refer to this as the LSL Portal to distinguish it.  If there&#039;s no objection, I&#039;ll move the pages with &amp;quot;LSL Wiki&amp;quot; in the title to some other appropriate name -- [[User:Rob Linden|Rob Linden]] 17:09, 24 January 2007 (PST)&lt;br /&gt;
:No objections here. :) I just updated [[LSL Wiki To-do]] with some assignment tables. I went ahead and moved it to [[LSL Portal To-do]] [[User:Talarus Luan|Talarus Luan]] 18:12, 24 January 2007 (PST)&lt;br /&gt;
:: Simple, consistent messaging: I&#039;ve gotten into the habit of using &amp;quot;LSL Portal&amp;quot; regularly myself.&lt;br /&gt;
:: --[[User:Torley Linden|Torley Linden]] 10:40, 31 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== A way back... ==&lt;br /&gt;
&lt;br /&gt;
Every page should have a header that goes back to the portal index not the wiki index.&lt;br /&gt;
if we could even geta link in the left hand would be great.&lt;br /&gt;
&lt;br /&gt;
[[User:Dimentox Travanti|Dimentox Travanti]] 10:47, 25 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
: I second the idea of a link in the main Navigation list.  It makes it a lot easier to access the LSL Portal.&lt;br /&gt;
: [[User:Cron Stardust|Cron Stardust]] 11:25, 5 March 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== Transitions ==&lt;br /&gt;
Encouraging to see this happening — and to see [http://www.lslwiki.org/ a second mirror] for the [http://www.lslwiki.com LSL wiki] too; hopefully I haven&#039;t come too late, because these developments look like they&#039;ve transpired over the last few days.&lt;br /&gt;
&lt;br /&gt;
Just wanted to let you know I&#039;ve added a link to our LSL Portal from our blog&#039;s Notices; it&#039;ll be up for some time. I&#039;m also going to add a simple article to the [http://secondlife.com/knowledgebase/ Knowledge Base] directing to this LSL Portal, since it&#039;s important to get more contributors aware, interested, and involved.&lt;br /&gt;
&lt;br /&gt;
I&#039;d like to personally be more active in this wiki... great things are afoot. I&#039;ve been spread across too many [http://secondlife.com/knowledgebase/article.php?id=357 communication channels] lately, so I&#039;ve been rotating between focuses (foci?); hopefully next week I&#039;ll have more hands-on energy here.&lt;br /&gt;
&lt;br /&gt;
Thanx to each and all of you building up this resource so far!&lt;br /&gt;
&lt;br /&gt;
--[[User:Torley Linden|Torley Linden]] 10:21, 26 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== LSL Header/Footer ==&lt;br /&gt;
Below is the header/footer template: &amp;lt;nowiki&amp;gt;{{LSL Header}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
{{LSL Header}}&lt;br /&gt;
Also, since &amp;lt;nowiki&amp;gt;&amp;lt;lsl&amp;gt;&amp;lt;/lsl&amp;gt;&amp;lt;/nowiki&amp;gt; tags don&#039;t seem to work yet, I used &amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt;... hope that&#039;s alright, I know nothing about wikis except what I&#039;ve taught myself tonight. --[[User:DoteDote Edison|DoteDote Edison]] 20:45, 27 January 2007 (EST)&lt;br /&gt;
:Actually, go ahead and use the &amp;lt;nowiki&amp;gt;&amp;lt;lsl&amp;gt;&amp;lt;/lsl&amp;gt;&amp;lt;/nowiki&amp;gt; tags. Even though it may look like crap right this minute, as soon as the module is installed, it will instantly be perfect. :) [[User:Talarus Luan|Talarus Luan]] 14:59, 29 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== LSL wiki-namespace ==&lt;br /&gt;
&lt;br /&gt;
All the LSL pages are prefixed with &amp;quot;LSL &amp;quot;, like &amp;quot;LSL Portal&amp;quot;, &amp;quot;LSL LLRand&amp;quot;, etc.  It would seem more justly to use the wiki-namespace &amp;quot;LSL:&amp;quot;.  Change the names from &amp;quot;LSL LLRand&amp;quot; to &amp;quot;LSL:LLRand&amp;quot;.  My 2 lindens. [[User:Dzonatas Sol|Dzonatas Sol]] 00:28, 2 February 2007 (PST) &lt;br /&gt;
:Just thought about this little more. We could use subpages instead of namespaces, then the talk pages will fully work.  &amp;quot;LSL/LLRand&amp;quot; for example [[User:Dzonatas Sol|Dzonatas Sol]] 00:41, 2 February 2007 (PST)&lt;br /&gt;
::I&#039;m not going to make a big fuss about it, but I&#039;d prefer if, per the [[Editing Guidelines]], that the page just be called &amp;quot;LLRand&amp;quot;. -- [[User:Rob Linden|Rob Linden]] 01:06, 2 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== LSL conformance test ==&lt;br /&gt;
&lt;br /&gt;
Hi folks, we&#039;re planning to consolidate a lot of our scattered LSL conformance tests on this wiki.  I created two rather crude templates: [[Template:LSL conformance test]] and [[Template:LSL conformance script]], which were created for adding our conformance suite.  See [[LSL llGetUnixTime test]] for an example.  I&#039;d like to get a sense from people if this is a sensible way to do this.  The idea is to get these templates stabilized, and that will provide us a mechanism for those of us at LL to consolidate our tests.  Of course, if the community wants to chip in, that&#039;s great too...having items in our standard LSL conformance suite makes it less likely that we&#039;ll break an LSL feature that&#039;s important to you. -- [[User:Rob Linden|Rob Linden]] 22:53, 7 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== LSL Categories List ==&lt;br /&gt;
What about a vertical list of categories down the right side of the LSL Portal front page?  The right-side list on the original wiki was my primary source of navigation, but maybe I&#039;m odd.  I could add it myself, but I&#039;m not sure how to make it automatically update the list as new categories are added. --[[User:DoteDote Edison|DoteDote Edison]] 20:20, 9 February 2007 (EST)&lt;br /&gt;
:Oops... right after I posted this, I noticed that it&#039;s item #4 on the &amp;quot;To-Do&amp;quot; list.  I went ahead and modified the front page to add a cetagories list.  If you don&#039;t like it, feel free to revert.  --[[User:DoteDote Edison|DoteDote Edison]] 20:55, 9 February 2007 (EST)&lt;br /&gt;
:The names all start with &amp;quot;LSL&amp;quot; and the names are not optimal for listing... The names could be changed though. I&#039;ll dig though the MediaWiki commands later and see if I can find any that would work well in this case. I don&#039;t have high hopes in this case. [[User:Strife Onizuka|Strife Onizuka]] 18:59, 9 February 2007 (PST)&lt;br /&gt;
Is the 200 articles per category page a mediawiki limit, or can we change it to 400 per page in a configuration somewhere? [[User:DoteDote Edison|DoteDote Edison]] 21:50, 22 February 2007 (EST)&lt;br /&gt;
&lt;br /&gt;
:If there&#039;s an issue with seeing all the pages, I can add the alphabetical navigation template later.&lt;br /&gt;
:[[User:SignpostMarv Martin|SignpostMarv Martin]] 06:16, 23 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== Internationalizing ==&lt;br /&gt;
&lt;br /&gt;
How do we want to go about internationalizing the LSL wiki. It should probably be tied into the global wiki effort. [[User:Strife Onizuka|Strife Onizuka]] 07:20, 11 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
:With modular templates (e.g. the way I do them) vs monolithic templates (e.g. the way you do them), the templates won&#039;t need to be changed, only the content going into them. Regarding [[User talk:SignpostMarv Martin/Sandbox/Project:Internationalisation#multi-lingual articles|Project:Internationalisation#multi-lingual articles]], I have some freaky ideas to make maintenance of the LSL-specific multi-lingual articles a little easier to maintain.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;p.s. I&#039;m not sure whether Internationalisation of the LSL articles should be discussed here or [[User talk:SignpostMarv Martin/Sandbox/Project:Internationalisation#multi-lingual articles|there]].&amp;lt;br /&amp;gt;[[User:SignpostMarv Martin|SignpostMarv Martin]] 08:05, 11 February 2007 (PST) [[Talk:LSL_Function_Style|Moved from Talk:LSL_Function_Style]]&lt;br /&gt;
&lt;br /&gt;
::But your idea on templates don&#039;t provide structure, it requires the user to provide the structure and if we want to change the layout of the pages we need to go through and change ever single page. I&#039;m pretty sure I can put together template-templates that should make translating the templates easy as setting a few variables. We wouldn&#039;t be using the template-template directly for rendering but use [http://meta.wikimedia.org/wiki/Help:Substitution substitution]. Changing a dozen monolithic templates is better then changing a dozen * 328 pages. Also means that you get the same translation ever single time.&amp;lt;br/&amp;gt;I&#039;ve been thinking i could modify the LSLC, LSLG, LSLGC templates to support automated linking in language specific subpages. So if the page you are on is in Spanish, the links will lead to pages in Spanish if they exist. No special modifications to the links needed.[[User:Strife Onizuka|Strife Onizuka]] 06:43, 13 February 2007 (PST)&lt;br /&gt;
:::&#039;&#039;But your idea on templates don&#039;t provide structure, it requires the user to provide the structure&#039;&#039;&lt;br /&gt;
:::* That&#039;s kinda the point. Look at what information will need to be reused over and over again, and put it into a small template. Then those templates can be used directly, or as part of a wrapper template.&lt;br /&gt;
:::&#039;&#039;I&#039;m pretty sure I can put together template-templates that should make translating the templates easy as setting a few variables.&#039;&#039;&lt;br /&gt;
:::* The templates don&#039;t need translating, just the content.&lt;br /&gt;
:::&#039;&#039;I&#039;ve been thinking i could modify the LSLC, LSLG, LSLGC templates to support automated linking in language specific subpages. So if the page you are on is in Spanish, the links will lead to pages in Spanish if they exist.&#039;&#039;&lt;br /&gt;
:::* That would be bad.&lt;br /&gt;
:::* Better idea to follow.&lt;br /&gt;
:::[[User:SignpostMarv Martin|SignpostMarv Martin]] 13:13, 13 February 2007 (PST)&lt;br /&gt;
:::[[Template:Multi-lang]] I&#039;ve given up fixing the bugs in that, but you get the idea behind it&#039;s intent. Include [[Help:Getting_started_in_Second_Life/langs]] in your test page and &amp;lt;nowiki&amp;gt;{{#vardefine:article-lang}}&amp;lt;/nowiki&amp;gt; to either &#039;&#039;&#039;spa&#039;&#039; or &#039;&#039;&#039;eng&#039;&#039;&#039;.&lt;br /&gt;
:::Please fork the code into your own userspace if you&#039;re going to work on it (unless you know of an instant fix) to prevent edit collisions.&lt;br /&gt;
:::I&#039;ve also started work on [[Template:ISO_639-3/native]] to save a bit of time with entering languages that one browser might not be configured for (e.g. the higher-end UTF-8 characters)&lt;br /&gt;
:::[[User:SignpostMarv Martin|SignpostMarv Martin]] 22:08, 19 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== phasing out of [[Template:LSLG]] ==&lt;br /&gt;
&lt;br /&gt;
Since the need to prefix almost everything with LSL_ is now being removed, all articles that are calling [[Template:LSLG]] should be edited to use a Wiki link, as the template is now rather redundant. &lt;br /&gt;
&lt;br /&gt;
The list of articles calling [[Template:LSLG|LSLG]] can be viewed via [https://wiki.secondlife.com/w/index.php?title=Special:Whatlinkshere&amp;amp;target=Template%3ALSLG Special:Whatlinkshere].&lt;br /&gt;
&amp;lt;br /&amp;gt;[[User:SignpostMarv Martin|SignpostMarv Martin]] 22:08, 19 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
:I think the pages in the {{LSLGC|FixMe}} category should be of a higher priority. Phasing out usage is reasonable, going through every page that uses it on the other hand just to remove it would be a waste of resources. I&#039;m a bit nervous about stopping using it at present, the metaphoric paint hasn&#039;t even dried on the move yet. Considering it doesn&#039;t effect the rendering, phasing it&#039;s usage out is appropriate. [[User:Strife Onizuka|Strife Onizuka]] 23:20, 20 February 2007 (PST)&lt;br /&gt;
::Waste of resources ?&lt;br /&gt;
::Isn&#039;t it a waste of resources to use a template that in most cases is entirely redundant ?&lt;br /&gt;
::[[User:SignpostMarv Martin|SignpostMarv Martin]] 02:23, 21 February 2007 (PST)&lt;br /&gt;
:::We haven&#039;t even finihed moving the function pages to the new names and template yet.  You could help with that instead of worrying about templates, you know. [[User:Gigs Taggart|Gigs Taggart]] 07:35, 21 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== The original LSL Wiki is back! ==&lt;br /&gt;
Catherine Omega&#039;s [http://www.lslwiki.net original LSL Wiki] is back. She mentioned:&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;&amp;quot;This is DEFINITELY back. And it&#039;s definitely permanent. It&#039;s all editable. And it&#039;s the &#039;official&#039;, Catherine-Omega-approved one.&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://www.catherineomega.com/2007/37/the-lsl-wiki-finds-a-new-home Further context can be found @ her blog.] --[[User:Torley Linden|Torley Linden]] 13:41, 28 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== Table ==&lt;br /&gt;
&lt;br /&gt;
I&#039;ve been playing with the table (again). I&#039;ve tried to get it so it looks decent in both IE and Firefox. I&#039;ve been trying to get it to put all the extra space into the last section, which I managed in Firefox but haven&#039;t figured out the correct permutation of parameters for IE. I&#039;m content at this moment to leave it be (I use Firefox). [[User:Strife Onizuka|Strife Onizuka]] 08:49, 17 March 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Warning notice? ==&lt;br /&gt;
&lt;br /&gt;
Might it be an idea to include a short warning on the top of this page that the LSL Portal is as yet incomplete?&lt;br /&gt;
&lt;br /&gt;
I just spent a while trying to find a list function I knew existed, but couldn&#039;t remember the exact name of, which hasn&#039;t made it here yet before realising that not all functions are listed yet.&lt;br /&gt;
--[[User:Nick Shatner|Nick Shatner]], 02:56, 2 May 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
:The vast majority of functions have been catagorized so if you had started from the {{LSLGC|List|list category page}} you probably would have found it. There are a small handful of functions that haven&#039;t been catagorized beyond the {{LSLGC|Functions}} category. I&#039;m not sure if a warning is warranted but I do recognize there are gaps in the LSL information. -- [[User:Strife Onizuka|Strife Onizuka]] 13:31, 2 May 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
llSetText page&lt;br /&gt;
&lt;br /&gt;
which is here&lt;br /&gt;
&lt;br /&gt;
http://wiki.secondlife.com/wiki/LlSetText&lt;br /&gt;
&lt;br /&gt;
is missing from page listing all the functions. Can&#039;t quite figure out how that page gets its info, so not going to touch it.&lt;br /&gt;
&lt;br /&gt;
== Conspiracy? ==&lt;br /&gt;
&lt;br /&gt;
I whould like to know if &amp;lt;br/&amp;gt;&lt;br /&gt;
a) this is a public wiki, where everybody can contribute so the LSL gets better known, or if it is a private viki with conspirativ charakter&amp;lt;br/&amp;gt;&lt;br /&gt;
b) why it is kept so spartanik with information&amp;lt;br/&amp;gt;&lt;br /&gt;
c) why no lindens who wrote LSL document their work&amp;lt;br/&amp;gt;&lt;br /&gt;
d) why some private persons are called administrators, what rights do they have, and if they have ever signed a paper that makes them not abuse theyr position&amp;lt;br/&amp;gt;&lt;br /&gt;
e) why linden lab employees never fisicaly work and only give &amp;quot;precios advises&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
dont dare to delete this.&amp;lt;br/&amp;gt;&lt;br /&gt;
{{User|Anylyn Hax}} 04:09, 8 August 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
:I shall try to answer:&lt;br /&gt;
:a) It is a public wiki but not everyone can contribute, you must have an SL account to contribute.&lt;br /&gt;
:b) No one has added more information.&lt;br /&gt;
:c) They did, it&#039;s in the LSL manual that ships with the client (it&#039;s common knowledge that it sucks).&lt;br /&gt;
:d) I don&#039;t know of any non-linden administrators on the wiki.&lt;br /&gt;
:e) The design of LSL is stable and there are very few LSL bugs that haven&#039;t been vetted; it would surprise me if there were any full time LSL devs. Just because we don&#039;t see them working doesn&#039;t mean they aren&#039;t working; the SL code base is huge.&lt;br /&gt;
:-- [[User:Strife Onizuka|Strife Onizuka]] 12:56, 8 August 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Vehicle Tutorial ==&lt;br /&gt;
&lt;br /&gt;
Could we get the original vehicle tutorial added to this wiki. I realize it&#039;s not in the correct format, but it&#039;s a place to start. There was a wikified version too in the old wiki someone did, but they&#039;d have to contribute it themselves I&#039;d think. I can&#039;t find the original tutorial outside the old wiki.&lt;br /&gt;
&lt;br /&gt;
:The tutorial was part of the LSL manual that ships with the client. LL has given permission to post it on the wiki. -- [[User:Strife Onizuka|Strife Onizuka]] 16:37, 8 September 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
::I found an old copy I had and wikified it. This is pretty much the original version, so it&#039;s probably a bit whacked, please fix any problems you&#039;re aware of [[User:Ralph Doctorow|Ralph Doctorow]]&lt;br /&gt;
&lt;br /&gt;
== color ==&lt;br /&gt;
&lt;br /&gt;
It would be very helpful if I could use different colored text when writing my articles. Could buttons be added for black text, red text, green text, and one other color of text? Or could someone list the codes that can be used to change text color?&lt;br /&gt;
&lt;br /&gt;
Just as an example of what I intend to use color for:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;black&#039;&#039;rotation &#039;&#039;red&#039;&#039;variable&#039;&#039;black&#039;&#039;=&amp;lt;&#039;&#039;red&#039;&#039;%,%,%,&#039;&#039;green&#039;&#039;#.#&#039;&#039;black&#039;&#039;&amp;gt;;&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Linden_Vehicle_Tutorial&amp;diff=33029</id>
		<title>Linden Vehicle Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Linden_Vehicle_Tutorial&amp;diff=33029"/>
		<updated>2007-09-26T21:54:46Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Header}}&lt;br /&gt;
&lt;br /&gt;
== Vehicles ==&lt;br /&gt;
&lt;br /&gt;
Vehicles are a new feature now available for use through LSL. This chapter will cover the basics of how vehicles&lt;br /&gt;
work, the terms used when describing vehicles, and a more thorough examination of the api available.&lt;br /&gt;
&lt;br /&gt;
There are several ways to make scripted objects move themselves around. One way is to turn the object into a&lt;br /&gt;
&amp;quot;vehicle&amp;quot;. This feature is versatile enough to make things that slide, hover, fly, and float. Some of the behaviors&lt;br /&gt;
that can be enabled are:&lt;br /&gt;
&lt;br /&gt;
*deflection of linear and angular velocity to preferred axis of motion&lt;br /&gt;
*asymmetric linear and angular friction&lt;br /&gt;
*hovering over terrain/water or at a global height&lt;br /&gt;
*banking on turns&lt;br /&gt;
*linear and angular motor for push and turning&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Each scripted object can have one vehicle behavior that is configurable through the[[llSetVehicleType]],&lt;br /&gt;
llSetVehicleFloatParam,llSetVehicleVectorParam,llSetVehicleRotationParam,llSetVehicleFlags, and&lt;br /&gt;
llRemoveVehicleFlags library calls.&lt;br /&gt;
&lt;br /&gt;
These script calls are described in more detail below, but the important thing to notice here is that the vehicle&lt;br /&gt;
behavior has several parameters that can be adjusted to change how the vehicle handles. Depending on the values&lt;br /&gt;
chosen the vehicle can veer like a boat in water, or ride like a sled on rails.&lt;br /&gt;
&lt;br /&gt;
Setting the vehicle flags allow you to make exceptions to some default behaviors. Some of these flags only have&lt;br /&gt;
an effect when certain behaviors are enabled. For example, the [[VEHICLE_FLAG_HOVER_WATER_ONLY]] will&lt;br /&gt;
make the vehicle ignore the height of the terrain, however it only makes a difference if the vehicle is hovering.&lt;br /&gt;
&lt;br /&gt;
== Warnings ==&lt;br /&gt;
&lt;br /&gt;
Vehicles are new in Second Life 1.1 and some of the details of their behavior may be changed as necessary to&lt;br /&gt;
ensure stability and user safety. In particular, many of the limits and defaults described in the appendices will&lt;br /&gt;
probably change and should not be relied upon in the long term.&lt;br /&gt;
&lt;br /&gt;
It is not recommended that you mix vehicle behavior with some of the other script calls that provide impulse and&lt;br /&gt;
forces to the object, especially[[llSetBuoyancy]],[[llSetForce]],[[llSetTorque]], and[[llSetHoverHeight]].&lt;br /&gt;
&lt;br /&gt;
While the following methods probably don’t cause any instabilities, their behavior may conflict with vehicles&lt;br /&gt;
and cause undesired and/or inconsistent results, so use[[llLookAt]],[[llRotLookAt]],[[llMoveToTarget]], and&lt;br /&gt;
[[llTargetOmega]] at your own risk.&lt;br /&gt;
&lt;br /&gt;
If you think you have found a bug relating to how vehicle’s work, one way to submit the problem is to give a&lt;br /&gt;
copy of the vehicle and script to Andrew Linden with comments or a notecard describing the problem. Please&lt;br /&gt;
name all submissions &amp;quot;Bugged Vehicle XX&amp;quot; where XX are your Second Life initials. The vehicle and script will&lt;br /&gt;
be examined at the earliest convenience.&lt;br /&gt;
&lt;br /&gt;
==  Definitions ==&lt;br /&gt;
&lt;br /&gt;
The terms &amp;quot;roll&amp;quot;, &amp;quot;pitch&amp;quot;, and &amp;quot;yaw&amp;quot; are often used to describe the modes of rotations that can happen to a&lt;br /&gt;
airplane or boat. They correspond to rotations about the local x-, y-, and z-axis respectively.&lt;br /&gt;
z-axis .&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Tait-Bryan_angles&lt;br /&gt;
&lt;br /&gt;
The right-hand-rule, often introduced in beginning physics courses, is used to define the direction of positive&lt;br /&gt;
rotation about any axis. As an example of how to use the right hand rule, consider a positive rotation about the&lt;br /&gt;
roll axis. To help visualize how such a rotation would move the airplane, place your right thumb parallel to the&lt;br /&gt;
plane’s roll-axis such that the thumb points in the positive x-direction, then curl the four fingers into a fist. Your&lt;br /&gt;
fingers will be pointing in the direction that the plane will spin.&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Right_hand_rule&lt;br /&gt;
&lt;br /&gt;
Many of the parameters that control a vehicle’s behavior are of the form:&lt;br /&gt;
&lt;br /&gt;
VEHICLE_&#039;&#039;&#039;BEHAVIOR&#039;&#039;&#039;_TIMESCALE&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;BEHAVIOR&#039;&#039;&#039; ’s &amp;quot;timescale&amp;quot; can usually be understood as the time for the&lt;br /&gt;
behavior to push, twist, or otherwise affect the vehicle such that the difference between what it is doing, and&lt;br /&gt;
what it is supposed to be doing, has been reduced to 1/e of what it was, where &amp;quot;e&amp;quot; is the natural exponent&lt;br /&gt;
(approximately 2.718281828). In other words, it is the timescale for exponential decay toward full compliance to&lt;br /&gt;
the desired behavior. When you want the vehicle to be very responsive use a short timescale of one second or&lt;br /&gt;
less, and if you want to disable a behavior then set the timescale to a very large number like 300 (5 minutes) or&lt;br /&gt;
more. Note, for stability reasons, there is usually a limit to how small a timescale is allowed to be, and is usually&lt;br /&gt;
on the order of a tenth of a second. Setting a timescale to zero is safe and is always equivalent to setting it to its&lt;br /&gt;
minimum. Any feature with a timescale can be effectively disabled by setting the timescale so large that it would&lt;br /&gt;
take them all day to have any effect.&lt;br /&gt;
&lt;br /&gt;
==  Setting the Vehicle Type ==&lt;br /&gt;
&lt;br /&gt;
Before any vehicle parameters can be set the vehicle behavior must first be enabled. It is enabled by calling&lt;br /&gt;
[[llSetVehicleType]] with any &#039;&#039;&#039;VEHICLE_TYPE_*&#039;&#039;&#039;, except [[VEHICLE_TYPE_NONE]] which will disable the&lt;br /&gt;
vehicle. See the {{LSLGC|Vehicle|vehicle types}} constants section for currently available types. More types will be available soon.&lt;br /&gt;
&lt;br /&gt;
Setting the vehicle type is necessary for enabling the vehicle behavior and sets all of the parameters to its default&lt;br /&gt;
values. For each vehicle type listed we provide the corresponding equivalent code in long format. Is is important&lt;br /&gt;
to realize that the defaults are not the optimal settings for any of these vehicle types and that they will definitely&lt;br /&gt;
be changed in the future. Do not rely on these values to be constant until specified.&lt;br /&gt;
&lt;br /&gt;
Should you want to make a unique or experimental vehicle you will still have to enable the vehicle behavior with&lt;br /&gt;
one of the default types first, after which you will be able to change any of the parameters or flags within the&lt;br /&gt;
allowed ranges.&lt;br /&gt;
&lt;br /&gt;
Setting the vehicle type does not automatically take controls or otherwise move the object. However should you&lt;br /&gt;
enable the vehicle behavior while the object is free to move and parked on a hill then it may start to slide away.&lt;br /&gt;
&lt;br /&gt;
We’re looking for new and better default vehicle types. If you think you’ve found a set of parameters that make a&lt;br /&gt;
better car, boat, or any other default type of vehicle then you may submit your proposed list of settings to&lt;br /&gt;
Andrew Linden via a script or notecard.&lt;br /&gt;
&lt;br /&gt;
==  Linear and Angular Deflection ==&lt;br /&gt;
&lt;br /&gt;
A common feature of real vehicles is their tendency to move along &amp;quot;preferred axes of motion&amp;quot;. That is, due to&lt;br /&gt;
their wheels, wings, shape, or method of propulsion they tend to push or redirect themselves along axes that are&lt;br /&gt;
static in the vehicle’s local frame. This general feature defines a class of vehicles and included in this category a&lt;br /&gt;
common dart is a &amp;quot;vehicle&amp;quot;: it has fins in the back such that if it were to tumble in the air it would eventually&lt;br /&gt;
align itself to move point-forward -- we’ll call this alignment effect angular deflection.&lt;br /&gt;
&lt;br /&gt;
A wheeled craft exhibits a different effect: when a skateboard is pushed in some direction it will tend to redirect&lt;br /&gt;
the resultant motion along that which it is free to roll -- we’ll call this effect linear deflection.&lt;br /&gt;
&lt;br /&gt;
So a typical Second Life vehicle is an object that exhibits linear and/or angular deflection along the &amp;quot;preferential&lt;br /&gt;
axes of motion&amp;quot;. The default preferential axes of motion are the local x- (at), y- (left), and z- (up) axes of the&lt;br /&gt;
local frame of the vehicle’s root primitive. The deflection behaviors relate to the x-axis (at): linear deflection will&lt;br /&gt;
tend to rotate its velocity until it points along it’s positive local x-axis while the angular deflection will tend to&lt;br /&gt;
reorient the vehicle such that it’s x-axis points in the direction that it is moving. The other axes are relevant to&lt;br /&gt;
vehicle behaviors that are described later, such as the vertical attractor which tries to keep a vehicle’s local z-axis&lt;br /&gt;
pointed toward the world z-axis (up). The vehicle axes can be rotated relative to the object’s actual local axes by&lt;br /&gt;
using the [[VEHICLE_REFERENCE_FRAME]] parameter, however that is an advanced feature and is covered in&lt;br /&gt;
detail in a later section of these documents.&lt;br /&gt;
&lt;br /&gt;
Depending on the vehicle it might be desirable to have lots of linear and/or angular delfection or not. The speed&lt;br /&gt;
of the deflections are controlled by setting the relevant parameters using the[[llSetVehicleFloatParam]] script call.&lt;br /&gt;
&lt;br /&gt;
Each variety of deflection has a &amp;quot;timescale&amp;quot; parameter that determines how quickly a full deflection happens.&lt;br /&gt;
&lt;br /&gt;
Basically the timescale it the time coefficient for exponential decay toward full deflection. So, a vehicle that&lt;br /&gt;
deflects quickly should have a small timescale. For instance, a typical dart might have a angular deflection&lt;br /&gt;
timescale of a couple of seconds but a linear deflection of several seconds; it will tend to reorient itself before it&lt;br /&gt;
changes direction. To set the deflection timescales of a dart you might use the lines below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetVehicleFloatParam(VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 2.0);&lt;br /&gt;
llSetVehicleFloatParam(VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 6.0);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each variety of deflection has an &amp;quot;efficiency&amp;quot; parameter that is a slider between 0.0 and 1.0. Unlike the other&lt;br /&gt;
efficiency parameter of other vehicle behaviors, the deflection efficiencies do not slide between &amp;quot;bouncy&amp;quot; and&lt;br /&gt;
&amp;quot;damped&amp;quot;, but instead slide from &amp;quot;no deflection whatsoever&amp;quot; (0.0) to &amp;quot;maximum deflection&amp;quot; (1.0). That is, they&lt;br /&gt;
behave much like the deflection timescales, however they are normalized to the range between 0.0 and 1.0.&lt;br /&gt;
&lt;br /&gt;
==  Moving the Vehicle ==&lt;br /&gt;
&lt;br /&gt;
Once enabled, a vehicle can be pushed and rotated by external forces and/or from script calls such as&lt;br /&gt;
[[llApplyImpulse]], however linear and angular motors have been built in to make motion easier and smoother.&lt;br /&gt;
Their directions can be set using the[[llSetVehicleVectorParam]] call. For example, to make the vehicle try to move&lt;br /&gt;
at 5 meters/second along its local x-axis (the default look-at direction) you would put the following line in your&lt;br /&gt;
script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, &amp;lt;5, 0, 0&amp;gt;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To prevent vehicles from moving too fast the magnitude of the linear motor is clamped to be no larger than about&lt;br /&gt;
30 meters/second. Note that this is clamped mostly because of limitations of the physics engine, and may be&lt;br /&gt;
raised later when possible.&lt;br /&gt;
&lt;br /&gt;
Setting the motor speed is not enough to enable all interesting vehicles. For example, some will want a car that&lt;br /&gt;
immediately gets up to the speed they want, while others will want a boat that slowly climbs up to its maximum&lt;br /&gt;
velocity. To control this effect you can use the [[VEHICLE_LINEAR_MOTOR_TIMESCALE]] parameter.&lt;br /&gt;
&lt;br /&gt;
Basically the &amp;quot;timescale&amp;quot; of a motor is the time constant for the vehicle to exponentially accelerate toward its full&lt;br /&gt;
speed.&lt;br /&gt;
&lt;br /&gt;
What would happen if you were to accidentally set the vehicle’s linear velocity to maximum possible speed and&lt;br /&gt;
then let go? It would run away and never stop, right? Not necessarily: an automatic &amp;quot;motor decay&amp;quot; has been built&lt;br /&gt;
in such that all motors will gradually decrease their effectiveness after being set.&lt;br /&gt;
&lt;br /&gt;
Each time the linear motor’s vector is set its &amp;quot;grip&amp;quot; immediately starts to decay exponentially with a timescale&lt;br /&gt;
determined by the [[VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE]], such that after enough time the&lt;br /&gt;
motor ceases to have any effect. This decay timescale serves two purposes. First, since it cannot be set longer&lt;br /&gt;
than 120 seconds, and is always enabled it gaurantees that a vehicle will not push itself about forever in the&lt;br /&gt;
absence of active control (from keyboard commands or some logic loop in the script). Second, it can be used to&lt;br /&gt;
push some vehicles around using a simple impulse model. That is, rather than setting the motor &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot;&lt;br /&gt;
depending on whether a particular key is pressed &amp;quot;down&amp;quot; or &amp;quot;up&amp;quot; the decay timescale can be set short and the&lt;br /&gt;
motor can be set &amp;quot;on&amp;quot; whenever the key transitions from &amp;quot;up&amp;quot; to &amp;quot;down&amp;quot; and allowed to automatically decay.&lt;br /&gt;
&lt;br /&gt;
Since the motor’s effectiveness is reset whenever the motor’s vector is set, then setting it to a vector of length&lt;br /&gt;
zero is different from allowing it to decay completely. The first case will cause the vehicle to try to reach zero&lt;br /&gt;
velocity, while the second will leave the motor impotent.&lt;br /&gt;
&lt;br /&gt;
The two motor timescales have very similar names, but have different effects, so try not to get them confused.&lt;br /&gt;
&lt;br /&gt;
::[[VEHICLE_LINEAR_MOTOR_TIMESCALE]] is the time for motor to &amp;quot;win&amp;quot;, and&lt;br /&gt;
&lt;br /&gt;
::[[VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE]] is the time for the motor’s &amp;quot;effectiveness&amp;quot; to decay&lt;br /&gt;
toward zero. If you set one when you think you are changing the other you will have frustrating results. Also, if&lt;br /&gt;
the motor’s decay timescale is shorter than the regular timescale, then the effective magnitude of the motor&lt;br /&gt;
vector will be diminished.&lt;br /&gt;
&lt;br /&gt;
==  Steering the Vehicle ==&lt;br /&gt;
&lt;br /&gt;
Much like the linear motor, there is also an angular motor that is always on, and whose direction and magnitude&lt;br /&gt;
can be set. For example, to make a vehicle turn at 5 degrees/sec around it’s local z-axis (its up-axis) you might&lt;br /&gt;
add the following lines to its script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vector angular_velocity = &amp;lt;0, 0, 5 * PI / 180&amp;gt;;&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DIRECTION, angular_velocity);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The magnitude of the angular motor is capped to be no more than two rotations per second (4*PI radians/sec).&lt;br /&gt;
&lt;br /&gt;
Also like the linear motor it has an efficiency parameter, [[VEHICLE_ANGULAR_MOTOR_TIMESCALE]], and a&lt;br /&gt;
motor decay parameter, [[VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE]], which is set to themaximum possible value of 120 seconds by default.&lt;br /&gt;
&lt;br /&gt;
When steering a vehicle you probably don’t want it to turn very far or for very long. One way to do it using the&lt;br /&gt;
angular motor would be to leave the decay timescale long, enable a significant amount of angular friction (to&lt;br /&gt;
quickly slow the vehicle down when the motor is turned off) then set the angular motor to a large vector on a key&lt;br /&gt;
press, and set it to zero when the key is released. Another way to do it is to set the&lt;br /&gt;
[[VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE]] to a short value and push the vehicle about with a&lt;br /&gt;
more impulsive method that sets the motor fast on a key press down (and optionally setting the motor to zero on&lt;br /&gt;
a key up) relying on the automatic exponential decay of the motor’s effectiveness rather than a constant angular&lt;br /&gt;
friction.&lt;br /&gt;
&lt;br /&gt;
Setting the angular motor to zero magnitude is different from allowing it to decay. When the motor completely&lt;br /&gt;
decays it no longer affects the motion of the vehicle, however setting it to zero will reset the &amp;quot;grip&amp;quot; of the vehicle&lt;br /&gt;
and will make the vehicle try to achieve zero angular velocity.&lt;br /&gt;
&lt;br /&gt;
For some vehicles it will be possible to use the &amp;quot;banking feature&amp;quot; to turn. &amp;quot;Banking&amp;quot; is what airplanes and&lt;br /&gt;
motorcycles do when they turn. When a banking vehicle twists about its roll-axis there is a resultant spin around&lt;br /&gt;
its yaw-axis. Banking is only available when using the &amp;quot;vertical attractor&amp;quot; which is described below.&lt;br /&gt;
&lt;br /&gt;
==  The Vertical Attractor ==&lt;br /&gt;
&lt;br /&gt;
Some vehicles, like boats, should always keep their up-side up. This can be done by enabling the &amp;quot;vertical&lt;br /&gt;
attractor&amp;quot; behavior that springs the vehicle’s local z-axis to the world z-axis (a.k.a. &amp;quot;up&amp;quot;). To take advantage of&lt;br /&gt;
this feature you would set the [[VEHICLE_VERTICAL_ATTRACTION_TIMESCALE]] to control the period of&lt;br /&gt;
the spring frequency, and then set the [[VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY]] to control the&lt;br /&gt;
damping. An efficiency of 0.0 will cause the spring to wobble around its equilibrium, while an efficiency of 1.0&lt;br /&gt;
will cause the spring to reach it’s equilibrium with exponential decay.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 4.0);&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 0.5);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The vertical attractor is disabled by setting its timescale to anything larger than 300 seconds.&lt;br /&gt;
&lt;br /&gt;
Note that by default the vertical attractor will prevent the vehicle from diving and climbing. So, if you wanted to&lt;br /&gt;
make a airplane you would probably want to unlock the attractor around the pitch axis by setting the&lt;br /&gt;
[[VEHICLE_FLAG_LIMIT_ROLL_ONLY]] bit:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetVehicleFlags(VEHICLE_FLAG_LIMIT_ROLL_ONLY);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Banking ==&lt;br /&gt;
&lt;br /&gt;
The vertical attractor feature must be enabled in order for the banking behavior to function. The way banking&lt;br /&gt;
works is this: a rotation around the vehicle’s roll-axis will produce a angular velocity around the yaw-axis,&lt;br /&gt;
causing the vehicle to turn. The magnitude of the yaw effect will be proportional to the&lt;br /&gt;
&lt;br /&gt;
::[[VEHICLE_BANKING_COEF]], the angle of the roll rotation, and sometimes the vehicle’s velocity along it’s&lt;br /&gt;
preferred axis of motion.&lt;br /&gt;
&lt;br /&gt;
::The [[VEHICLE_BANKING_COEF]] can vary between -1 and +1. When it’s positive then any positive rotation (by&lt;br /&gt;
the right-hand rule) about the roll-axis will effect a (negative) torque around the yaw-axis, making it turn to the&lt;br /&gt;
right -- that is the vehicle will lean into the turn, which is how real airplanes and motorcycle’s work. Negating&lt;br /&gt;
the banking coefficient will make it so that the vehicle leans to the outside of the turn (not very &amp;quot;physical&amp;quot; but&lt;br /&gt;
might allow interesting vehicles so why not?).&lt;br /&gt;
&lt;br /&gt;
::The [[VEHICLE_BANKING_MIX]] is a fake (i.e. non-physical) parameter that is useful for making banking&lt;br /&gt;
vehicles do what you want rather than what the laws of physics allow. For example, consider a real motorcycle...&lt;br /&gt;
it must be moving forward in order for it to turn while banking, however video-game motorcycles are often&lt;br /&gt;
configured to turn in place when at a dead stop -- because they’re often easier to control that way using the&lt;br /&gt;
limited interface of the keyboard or game controller. The [[VEHICLE_BANKING_MIX]] enables combinations of&lt;br /&gt;
both realistic and non-realistic banking by fuctioning as a slider between a banking that is correspondingly&lt;br /&gt;
totally static (0.0) and totally dynamic (1.0). By &amp;quot;static&amp;quot; we mean that the banking effect depends only on the&lt;br /&gt;
vehicle’s rotation about it’s roll-axis compared to &amp;quot;dynamic&amp;quot; where the banking is also proportional to it’s&lt;br /&gt;
velocity along it’s roll-axis. Finding the best value of the &amp;quot;mixture&amp;quot; will probably require trial and error.&lt;br /&gt;
&lt;br /&gt;
The time it takes for the banking behavior to defeat a pre-existing angular velocity about the world z-axis is&lt;br /&gt;
determined by the [[VEHICLE_BANKING_TIMESCALE]]. So if you want the vehicle to bank quickly then give it&lt;br /&gt;
a banking timescale of about a second or less, otherwise you can make a sluggish vehicle by giving it a timescale&lt;br /&gt;
of several seconds.&lt;br /&gt;
&lt;br /&gt;
==  Friction Timescales ==&lt;br /&gt;
&lt;br /&gt;
[[VEHICLE_LINEAR_FRICTION_TIMESCALE]] is a vector parameter that defines the timescales for the vehicle&lt;br /&gt;
to come to a complete stop along the three local axes of the vehicle’s reference frame. The timescale along each&lt;br /&gt;
axis is independent of the others. For example, a sliding ground car would probably have very little friction along&lt;br /&gt;
its x- and z-axes (so it can easily slide forward and fall down) while there would usually significant friction along&lt;br /&gt;
its y-axis:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, &amp;lt;1000, 1000, 3&amp;gt;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Remember that a longer timescale corresponds to a weaker friction, hence to effectively disable all linear friction&lt;br /&gt;
you would set all of the timescales to large values.&lt;br /&gt;
&lt;br /&gt;
Setting the linear friction as a scalar is allowed, and has the effect of setting all of the timescales to the same&lt;br /&gt;
value. Both code snippets below are equivalent, and both make friction negligible:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// set all linear friction timescales to 1000&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, &amp;lt;1000, 1000, 1000&amp;gt;);&lt;br /&gt;
// same as above, but fewer characters&lt;br /&gt;
llSetVehicleFloatParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, 1000);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
/[[VEHICLE_ANGULAR_FRICTION_TIMESCALE]] is also a vector parameter that defines the timescales for the&lt;br /&gt;
vehicle to stop rotating about the x-, y-, and z-axes, and are set and disabled in the same way as the linear friction.&lt;br /&gt;
&lt;br /&gt;
==  Buoyancy ==&lt;br /&gt;
&lt;br /&gt;
The vehicle has a built-in buoyancy feature that is independent of the[[llSetBuoyancy]] call. It is recommended that&lt;br /&gt;
the two buoyancies do not mix! To make a vehicle buoyant, set the [[VEHICLE_BUOYANCY]] parameter to&lt;br /&gt;
something between 0.0 (no buoyancy whatsoever) to 1.0 (full anti-gravity).&lt;br /&gt;
&lt;br /&gt;
The buoyancy behavior is independent of hover, however in order for hover to work without a large offset of the&lt;br /&gt;
[[VEHICLE_HOVER_HEIGHT]], the [[VEHICLE_BUOYANCY]] should be set to 1.0.&lt;br /&gt;
&lt;br /&gt;
It is not recommended that you mix vehicle buoyancy with the[[llSetBuoyancy]] script call. It would probably&lt;br /&gt;
cause the object to fly up into space.&lt;br /&gt;
&lt;br /&gt;
==  Hover ==&lt;br /&gt;
&lt;br /&gt;
The hover behavior is enabled by setting the [[VEHICLE_HOVER_TIMESCALE]] to a value less than 300&lt;br /&gt;
seconds; larger timescales totally disable it. Most vehicles will work best with short hover timescales of a few&lt;br /&gt;
seconds or less. The shorter the timescale, the faster the vehicle will slave to is target height. Note, that if the&lt;br /&gt;
values of [[VEHICLE_LINEAR_FRICTION_TIMESCALE]] may affect the speed of the hover.&lt;br /&gt;
&lt;br /&gt;
Hover is independent of buoyancy, however the [[VEHICLE_BUOYANCY]] should be set to 1.0, otherwise the&lt;br /&gt;
vehicle will not lift itself off of the ground until the [[VEHICLE_HOVER_HEIGHT]] is made large enough to&lt;br /&gt;
counter the acceleration of gravity, and the vehicle will never float all the way to its target height.&lt;br /&gt;
&lt;br /&gt;
The [[VEHICLE_HOVER_EFFICIENCY]] can be thought of as a slider between bouncy (0.0) and smoothed (1.0).&lt;br /&gt;
&lt;br /&gt;
When in the bouncy range the vehicle will tend to hover a little lower than its target height and the&lt;br /&gt;
[[VEHICLE_HOVER_TIMESCALE]] will be approximately the oscillation period of the bounce (the real period&lt;br /&gt;
will tend to be a little longer than the timescale).&lt;br /&gt;
&lt;br /&gt;
For performance reasons, until improvements are made to the Second Life physics engine the vehicles can only&lt;br /&gt;
hover over the terrain and water, so they will not be able to hover above objects made out of primitives, such as&lt;br /&gt;
bridges and houses. By default the hover behavior will float over terrain and water, however this can be changed&lt;br /&gt;
by setting some flags:&lt;br /&gt;
&lt;br /&gt;
If you wanted to make a boat you should set the [[VEHICLE_HOVER_WATER_ONLY]] flag, or if you wanted to&lt;br /&gt;
drive a hover tank under water you would use the [[VEHICLE_HOVER_TERRAIN_ONLY]] flag instead. Finally,&lt;br /&gt;
if you wanted to make a submarine or a balloon you would use the [[VEHICLE_HOVER_GLOBAL_HEIGHT]].&lt;br /&gt;
&lt;br /&gt;
Note that the flags are independent of each other and that setting two contradictory flags will have undefined&lt;br /&gt;
behavor. The flags are set using the script call[[llSetVehicleFlags()]].&lt;br /&gt;
&lt;br /&gt;
The [[VEHICLE_HOVER_HEIGHT]] determines how high the vehicle will hover over the terrain and/or water, or&lt;br /&gt;
the global height, and has a maximum value of 100 meters. Note that for hovering purposes the &amp;quot;center&amp;quot; of the&lt;br /&gt;
vehicle is its &amp;quot;center of mass&amp;quot; which is not always obvious to the untrained eye, and it changes when avatar’s sit&lt;br /&gt;
on the vehicle.&lt;br /&gt;
&lt;br /&gt;
==  Reference Frame ==&lt;br /&gt;
&lt;br /&gt;
The vehicle relies on the x- (at), y- (left), and z- (up) axes in order to figure out which way it preferres to move&lt;br /&gt;
and which end is up. By default these axes are identical to the local axes of the root primitive of the object,&lt;br /&gt;
however this means that the vehicle’s root primitive must, by default, be oriented to agree with the designed at,&lt;br /&gt;
left, and up axes of the vehicle. But, what if the vehicle object was already pre-built with the root primitive in&lt;br /&gt;
some non-trivial orientation relative to where the vehicle as a whole should move? This is where the&lt;br /&gt;
&lt;br /&gt;
[[VEHICLE_REFERENCE_FRAME]] parameter becomes useful; the vehicle’s axes can be arbitrarily reoriented&lt;br /&gt;
by setting this parameter.&lt;br /&gt;
&lt;br /&gt;
As an example, suppose you had built a rocket out of a big cylinder, a cone for the nose, and some stretched cut&lt;br /&gt;
boxes for the fins, then linked them all together with the cylinder as the root primitive. Ideally the rocket would&lt;br /&gt;
move nose-first, however the cylinder’s axis of symmetry is its local z-axis while the default &amp;quot;at-axis&amp;quot; of the&lt;br /&gt;
vehicle, the axis it will want to deflect to forward under angular deflection, is the local x-axis and points out from&lt;br /&gt;
the curved surface of the cylinder. The script code below will rotate the vehicle’s axes such that the local z-axis&lt;br /&gt;
becomes the &amp;quot;at-axis&amp;quot; and the local negative x-axis becomes the &amp;quot;up-axis&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// rotate the vehicle frame -PI/2 about the local y-axis (left-axis)&lt;br /&gt;
rotation rot =llEuler2Rot(0, PI/2, 0);&lt;br /&gt;
llSetVehicleRotationParam(VEHICLE_REFERENCE_FRAME, rot);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Another example of how the reference frame parameter could be used is to consider flying craft that uses the&lt;br /&gt;
vertical attractor for stability during flying but wants to use VTOL (vertical takeoff and landing). During flight&lt;br /&gt;
the craft’s dorsal axis should point up, but during landing its nose-axis should be up. To land the vehicle: while&lt;br /&gt;
the vertical attractor is in effect, rotate the existing [[VEHICLE_REFERENCE_FRAME]] by +PI/2 about the&lt;br /&gt;
left-axis, then the vehicle will pitch up such that it’s nose points toward the sky. The vehicle could be allowed to&lt;br /&gt;
fall to the landing pad under friction, or a decreasing hover effect.&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Vehicle|Tutorial}} {{LSLC|Tutorials|Vehicle}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Linden_Vehicle_Tutorial&amp;diff=33028</id>
		<title>Linden Vehicle Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Linden_Vehicle_Tutorial&amp;diff=33028"/>
		<updated>2007-09-26T21:54:30Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Header}}&lt;br /&gt;
&lt;br /&gt;
== Vehicles ==&lt;br /&gt;
&lt;br /&gt;
Vehicles are a new feature now available for use through LSL. This chapter will cover the basics of how vehicles&lt;br /&gt;
work, the terms used when describing vehicles, and a more thorough examination of the api available.&lt;br /&gt;
&lt;br /&gt;
There are several ways to make scripted objects move themselves around. One way is to turn the object into a&lt;br /&gt;
&amp;quot;vehicle&amp;quot;. This feature is versatile enough to make things that slide, hover, fly, and float. Some of the behaviors&lt;br /&gt;
that can be enabled are:&lt;br /&gt;
&lt;br /&gt;
*deflection of linear and angular velocity to preferred axis of motion&lt;br /&gt;
*asymmetric linear and angular friction&lt;br /&gt;
*hovering over terrain/water or at a global height&lt;br /&gt;
*banking on turns&lt;br /&gt;
*linear and angular motor for push and turning&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Each scripted object can have one vehicle behavior that is configurable through the[[llSetVehicleType]],&lt;br /&gt;
llSetVehicleFloatParam,llSetVehicleVectorParam,llSetVehicleRotationParam,llSetVehicleFlags, and&lt;br /&gt;
llRemoveVehicleFlags library calls.&lt;br /&gt;
&lt;br /&gt;
These script calls are described in more detail below, but the important thing to notice here is that the vehicle&lt;br /&gt;
behavior has several parameters that can be adjusted to change how the vehicle handles. Depending on the values&lt;br /&gt;
chosen the vehicle can veer like a boat in water, or ride like a sled on rails.&lt;br /&gt;
&lt;br /&gt;
Setting the vehicle flags allow you to make exceptions to some default behaviors. Some of these flags only have&lt;br /&gt;
an effect when certain behaviors are enabled. For example, the [[VEHICLE_FLAG_HOVER_WATER_ONLY]] will&lt;br /&gt;
make the vehicle ignore the height of the terrain, however it only makes a difference if the vehicle is hovering.&lt;br /&gt;
&lt;br /&gt;
== Warnings ==&lt;br /&gt;
&lt;br /&gt;
Vehicles are new in Second Life 1.1 and some of the details of their behavior may be changed as necessary to&lt;br /&gt;
ensure stability and user safety. In particular, many of the limits and defaults described in the appendices will&lt;br /&gt;
probably change and should not be relied upon in the long term.&lt;br /&gt;
&lt;br /&gt;
It is not recommended that you mix vehicle behavior with some of the other script calls that provide impulse and&lt;br /&gt;
forces to the object, especially[[llSetBuoyancy]],[[llSetForce]],[[llSetTorque]], and[[llSetHoverHeight]].&lt;br /&gt;
&lt;br /&gt;
While the following methods probably don’t cause any instabilities, their behavior may conflict with vehicles&lt;br /&gt;
and cause undesired and/or inconsistent results, so use[[llLookAt]],[[llRotLookAt]],[[llMoveToTarget]], and&lt;br /&gt;
[[llTargetOmega]] at your own risk.&lt;br /&gt;
&lt;br /&gt;
If you think you have found a bug relating to how vehicle’s work, one way to submit the problem is to give a&lt;br /&gt;
copy of the vehicle and script to Andrew Linden with comments or a notecard describing the problem. Please&lt;br /&gt;
name all submissions &amp;quot;Bugged Vehicle XX&amp;quot; where XX are your Second Life initials. The vehicle and script will&lt;br /&gt;
be examined at the earliest convenience.&lt;br /&gt;
&lt;br /&gt;
==  Definitions ==&lt;br /&gt;
&lt;br /&gt;
The terms &amp;quot;roll&amp;quot;, &amp;quot;pitch&amp;quot;, and &amp;quot;yaw&amp;quot; are often used to describe the modes of rotations that can happen to a&lt;br /&gt;
airplane or boat. They correspond to rotations about the local x-, y-, and z-axis respectively.&lt;br /&gt;
z-axis .&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Tait-Bryan_angles&lt;br /&gt;
&lt;br /&gt;
The right-hand-rule, often introduced in beginning physics courses, is used to define the direction of positive&lt;br /&gt;
rotation about any axis. As an example of how to use the right hand rule, consider a positive rotation about the&lt;br /&gt;
roll axis. To help visualize how such a rotation would move the airplane, place your right thumb parallel to the&lt;br /&gt;
plane’s roll-axis such that the thumb points in the positive x-direction, then curl the four fingers into a fist. Your&lt;br /&gt;
fingers will be pointing in the direction that the plane will spin.&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Right_hand_rule&lt;br /&gt;
&lt;br /&gt;
Many of the parameters that control a vehicle’s behavior are of the form:&lt;br /&gt;
&lt;br /&gt;
VEHICLE_&#039;&#039;&#039;BEHAVIOR&#039;&#039;&#039;_TIMESCALE&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;BEHAVIOR&#039;&#039;&#039; ’s &amp;quot;timescale&amp;quot; can usually be understood as the time for the&lt;br /&gt;
behavior to push, twist, or otherwise affect the vehicle such that the difference between what it is doing, and&lt;br /&gt;
what it is supposed to be doing, has been reduced to 1/e of what it was, where &amp;quot;e&amp;quot; is the natural exponent&lt;br /&gt;
(approximately 2.718281828). In other words, it is the timescale for exponential decay toward full compliance to&lt;br /&gt;
the desired behavior. When you want the vehicle to be very responsive use a short timescale of one second or&lt;br /&gt;
less, and if you want to disable a behavior then set the timescale to a very large number like 300 (5 minutes) or&lt;br /&gt;
more. Note, for stability reasons, there is usually a limit to how small a timescale is allowed to be, and is usually&lt;br /&gt;
on the order of a tenth of a second. Setting a timescale to zero is safe and is always equivalent to setting it to its&lt;br /&gt;
minimum. Any feature with a timescale can be effectively disabled by setting the timescale so large that it would&lt;br /&gt;
take them all day to have any effect.&lt;br /&gt;
&lt;br /&gt;
==  Setting the Vehicle Type ==&lt;br /&gt;
&lt;br /&gt;
Before any vehicle parameters can be set the vehicle behavior must first be enabled. It is enabled by calling&lt;br /&gt;
[[llSetVehicleType]] with any &#039;&#039;&#039;VEHICLE_TYPE_*&#039;&#039;&#039;, except [[VEHICLE_TYPE_NONE]] which will disable the&lt;br /&gt;
vehicle. See the {{LSLGC|Vehicle|vehicle types}} constants section for currently available types. More types will be available soon.&lt;br /&gt;
&lt;br /&gt;
Setting the vehicle type is necessary for enabling the vehicle behavior and sets all of the parameters to its default&lt;br /&gt;
values. For each vehicle type listed we provide the corresponding equivalent code in long format. Is is important&lt;br /&gt;
to realize that the defaults are not the optimal settings for any of these vehicle types and that they will definitely&lt;br /&gt;
be changed in the future. Do not rely on these values to be constant until specified.&lt;br /&gt;
&lt;br /&gt;
Should you want to make a unique or experimental vehicle you will still have to enable the vehicle behavior with&lt;br /&gt;
one of the default types first, after which you will be able to change any of the parameters or flags within the&lt;br /&gt;
allowed ranges.&lt;br /&gt;
&lt;br /&gt;
Setting the vehicle type does not automatically take controls or otherwise move the object. However should you&lt;br /&gt;
enable the vehicle behavior while the object is free to move and parked on a hill then it may start to slide away.&lt;br /&gt;
&lt;br /&gt;
We’re looking for new and better default vehicle types. If you think you’ve found a set of parameters that make a&lt;br /&gt;
better car, boat, or any other default type of vehicle then you may submit your proposed list of settings to&lt;br /&gt;
Andrew Linden via a script or notecard.&lt;br /&gt;
&lt;br /&gt;
==  Linear and Angular Deflection ==&lt;br /&gt;
&lt;br /&gt;
A common feature of real vehicles is their tendency to move along &amp;quot;preferred axes of motion&amp;quot;. That is, due to&lt;br /&gt;
their wheels, wings, shape, or method of propulsion they tend to push or redirect themselves along axes that are&lt;br /&gt;
static in the vehicle’s local frame. This general feature defines a class of vehicles and included in this category a&lt;br /&gt;
common dart is a &amp;quot;vehicle&amp;quot;: it has fins in the back such that if it were to tumble in the air it would eventually&lt;br /&gt;
align itself to move point-forward -- we’ll call this alignment effect angular deflection.&lt;br /&gt;
&lt;br /&gt;
A wheeled craft exhibits a different effect: when a skateboard is pushed in some direction it will tend to redirect&lt;br /&gt;
the resultant motion along that which it is free to roll -- we’ll call this effect linear deflection.&lt;br /&gt;
&lt;br /&gt;
So a typical Second Life vehicle is an object that exhibits linear and/or angular deflection along the &amp;quot;preferential&lt;br /&gt;
axes of motion&amp;quot;. The default preferential axes of motion are the local x- (at), y- (left), and z- (up) axes of the&lt;br /&gt;
local frame of the vehicle’s root primitive. The deflection behaviors relate to the x-axis (at): linear deflection will&lt;br /&gt;
tend to rotate its velocity until it points along it’s positive local x-axis while the angular deflection will tend to&lt;br /&gt;
reorient the vehicle such that it’s x-axis points in the direction that it is moving. The other axes are relevant to&lt;br /&gt;
vehicle behaviors that are described later, such as the vertical attractor which tries to keep a vehicle’s local z-axis&lt;br /&gt;
pointed toward the world z-axis (up). The vehicle axes can be rotated relative to the object’s actual local axes by&lt;br /&gt;
using the [[VEHICLE_REFERENCE_FRAME]] parameter, however that is an advanced feature and is covered in&lt;br /&gt;
detail in a later section of these documents.&lt;br /&gt;
&lt;br /&gt;
Depending on the vehicle it might be desirable to have lots of linear and/or angular delfection or not. The speed&lt;br /&gt;
of the deflections are controlled by setting the relevant parameters using the[[llSetVehicleFloatParam]] script call.&lt;br /&gt;
&lt;br /&gt;
Each variety of deflection has a &amp;quot;timescale&amp;quot; parameter that determines how quickly a full deflection happens.&lt;br /&gt;
&lt;br /&gt;
Basically the timescale it the time coefficient for exponential decay toward full deflection. So, a vehicle that&lt;br /&gt;
deflects quickly should have a small timescale. For instance, a typical dart might have a angular deflection&lt;br /&gt;
timescale of a couple of seconds but a linear deflection of several seconds; it will tend to reorient itself before it&lt;br /&gt;
changes direction. To set the deflection timescales of a dart you might use the lines below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetVehicleFloatParam(VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 2.0);&lt;br /&gt;
llSetVehicleFloatParam(VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 6.0);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each variety of deflection has an &amp;quot;efficiency&amp;quot; parameter that is a slider between 0.0 and 1.0. Unlike the other&lt;br /&gt;
efficiency parameter of other vehicle behaviors, the deflection efficiencies do not slide between &amp;quot;bouncy&amp;quot; and&lt;br /&gt;
&amp;quot;damped&amp;quot;, but instead slide from &amp;quot;no deflection whatsoever&amp;quot; (0.0) to &amp;quot;maximum deflection&amp;quot; (1.0). That is, they&lt;br /&gt;
behave much like the deflection timescales, however they are normalized to the range between 0.0 and 1.0.&lt;br /&gt;
&lt;br /&gt;
==  Moving the Vehicle ==&lt;br /&gt;
&lt;br /&gt;
Once enabled, a vehicle can be pushed and rotated by external forces and/or from script calls such as&lt;br /&gt;
[[llApplyImpulse]], however linear and angular motors have been built in to make motion easier and smoother.&lt;br /&gt;
Their directions can be set using the[[llSetVehicleVectorParam]] call. For example, to make the vehicle try to move&lt;br /&gt;
at 5 meters/second along its local x-axis (the default look-at direction) you would put the following line in your&lt;br /&gt;
script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, &amp;lt;5, 0, 0&amp;gt;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To prevent vehicles from moving too fast the magnitude of the linear motor is clamped to be no larger than about&lt;br /&gt;
30 meters/second. Note that this is clamped mostly because of limitations of the physics engine, and may be&lt;br /&gt;
raised later when possible.&lt;br /&gt;
&lt;br /&gt;
Setting the motor speed is not enough to enable all interesting vehicles. For example, some will want a car that&lt;br /&gt;
immediately gets up to the speed they want, while others will want a boat that slowly climbs up to its maximum&lt;br /&gt;
velocity. To control this effect you can use the [[VEHICLE_LINEAR_MOTOR_TIMESCALE]] parameter.&lt;br /&gt;
&lt;br /&gt;
Basically the &amp;quot;timescale&amp;quot; of a motor is the time constant for the vehicle to exponentially accelerate toward its full&lt;br /&gt;
speed.&lt;br /&gt;
&lt;br /&gt;
What would happen if you were to accidentally set the vehicle’s linear velocity to maximum possible speed and&lt;br /&gt;
then let go? It would run away and never stop, right? Not necessarily: an automatic &amp;quot;motor decay&amp;quot; has been built&lt;br /&gt;
in such that all motors will gradually decrease their effectiveness after being set.&lt;br /&gt;
&lt;br /&gt;
Each time the linear motor’s vector is set its &amp;quot;grip&amp;quot; immediately starts to decay exponentially with a timescale&lt;br /&gt;
determined by the [[VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE]], such that after enough time the&lt;br /&gt;
motor ceases to have any effect. This decay timescale serves two purposes. First, since it cannot be set longer&lt;br /&gt;
than 120 seconds, and is always enabled it gaurantees that a vehicle will not push itself about forever in the&lt;br /&gt;
absence of active control (from keyboard commands or some logic loop in the script). Second, it can be used to&lt;br /&gt;
push some vehicles around using a simple impulse model. That is, rather than setting the motor &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot;&lt;br /&gt;
depending on whether a particular key is pressed &amp;quot;down&amp;quot; or &amp;quot;up&amp;quot; the decay timescale can be set short and the&lt;br /&gt;
motor can be set &amp;quot;on&amp;quot; whenever the key transitions from &amp;quot;up&amp;quot; to &amp;quot;down&amp;quot; and allowed to automatically decay.&lt;br /&gt;
&lt;br /&gt;
Since the motor’s effectiveness is reset whenever the motor’s vector is set, then setting it to a vector of length&lt;br /&gt;
zero is different from allowing it to decay completely. The first case will cause the vehicle to try to reach zero&lt;br /&gt;
velocity, while the second will leave the motor impotent.&lt;br /&gt;
&lt;br /&gt;
The two motor timescales have very similar names, but have different effects, so try not to get them confused.&lt;br /&gt;
&lt;br /&gt;
::[[VEHICLE_LINEAR_MOTOR_TIMESCALE]] is the time for motor to &amp;quot;win&amp;quot;, and&lt;br /&gt;
&lt;br /&gt;
::[[VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE]] is the time for the motor’s &amp;quot;effectiveness&amp;quot; to decay&lt;br /&gt;
toward zero. If you set one when you think you are changing the other you will have frustrating results. Also, if&lt;br /&gt;
the motor’s decay timescale is shorter than the regular timescale, then the effective magnitude of the motor&lt;br /&gt;
vector will be diminished.&lt;br /&gt;
&lt;br /&gt;
==  Steering the Vehicle ==&lt;br /&gt;
&lt;br /&gt;
Much like the linear motor, there is also an angular motor that is always on, and whose direction and magnitude&lt;br /&gt;
can be set. For example, to make a vehicle turn at 5 degrees/sec around it’s local z-axis (its up-axis) you might&lt;br /&gt;
add the following lines to its script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vector angular_velocity = &amp;lt;0, 0, 5 * PI / 180&amp;gt;;&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DIRECTION, angular_velocity);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The magnitude of the angular motor is capped to be no more than two rotations per second (4*PI radians/sec).&lt;br /&gt;
&lt;br /&gt;
Also like the linear motor it has an efficiency parameter, [[VEHICLE_ANGULAR_MOTOR_TIMESCALE]], and a&lt;br /&gt;
motor decay parameter, [[VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE]], which is set to themaximum possible value of 120 seconds by default.&lt;br /&gt;
&lt;br /&gt;
When steering a vehicle you probably don’t want it to turn very far or for very long. One way to do it using the&lt;br /&gt;
angular motor would be to leave the decay timescale long, enable a significant amount of angular friction (to&lt;br /&gt;
quickly slow the vehicle down when the motor is turned off) then set the angular motor to a large vector on a key&lt;br /&gt;
press, and set it to zero when the key is released. Another way to do it is to set the&lt;br /&gt;
[[VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE]] to a short value and push the vehicle about with a&lt;br /&gt;
more impulsive method that sets the motor fast on a key press down (and optionally setting the motor to zero on&lt;br /&gt;
a key up) relying on the automatic exponential decay of the motor’s effectiveness rather than a constant angular&lt;br /&gt;
friction.&lt;br /&gt;
&lt;br /&gt;
Setting the angular motor to zero magnitude is different from allowing it to decay. When the motor completely&lt;br /&gt;
decays it no longer affects the motion of the vehicle, however setting it to zero will reset the &amp;quot;grip&amp;quot; of the vehicle&lt;br /&gt;
and will make the vehicle try to achieve zero angular velocity.&lt;br /&gt;
&lt;br /&gt;
For some vehicles it will be possible to use the &amp;quot;banking feature&amp;quot; to turn. &amp;quot;Banking&amp;quot; is what airplanes and&lt;br /&gt;
motorcycles do when they turn. When a banking vehicle twists about its roll-axis there is a resultant spin around&lt;br /&gt;
its yaw-axis. Banking is only available when using the &amp;quot;vertical attractor&amp;quot; which is described below.&lt;br /&gt;
&lt;br /&gt;
==  The Vertical Attractor ==&lt;br /&gt;
&lt;br /&gt;
Some vehicles, like boats, should always keep their up-side up. This can be done by enabling the &amp;quot;vertical&lt;br /&gt;
attractor&amp;quot; behavior that springs the vehicle’s local z-axis to the world z-axis (a.k.a. &amp;quot;up&amp;quot;). To take advantage of&lt;br /&gt;
this feature you would set the [[VEHICLE_VERTICAL_ATTRACTION_TIMESCALE]] to control the period of&lt;br /&gt;
the spring frequency, and then set the [[VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY]] to control the&lt;br /&gt;
damping. An efficiency of 0.0 will cause the spring to wobble around its equilibrium, while an efficiency of 1.0&lt;br /&gt;
will cause the spring to reach it’s equilibrium with exponential decay.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 4.0);&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 0.5);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The vertical attractor is disabled by setting its timescale to anything larger than 300 seconds.&lt;br /&gt;
&lt;br /&gt;
Note that by default the vertical attractor will prevent the vehicle from diving and climbing. So, if you wanted to&lt;br /&gt;
make a airplane you would probably want to unlock the attractor around the pitch axis by setting the&lt;br /&gt;
[[VEHICLE_FLAG_LIMIT_ROLL_ONLY]] bit:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetVehicleFlags(VEHICLE_FLAG_LIMIT_ROLL_ONLY);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Banking ==&lt;br /&gt;
&lt;br /&gt;
The vertical attractor feature must be enabled in order for the banking behavior to function. The way banking&lt;br /&gt;
works is this: a rotation around the vehicle’s roll-axis will produce a angular velocity around the yaw-axis,&lt;br /&gt;
causing the vehicle to turn. The magnitude of the yaw effect will be proportional to the&lt;br /&gt;
&lt;br /&gt;
::[[VEHICLE_BANKING_COEF]], the angle of the roll rotation, and sometimes the vehicle’s velocity along it’s&lt;br /&gt;
preferred axis of motion.&lt;br /&gt;
&lt;br /&gt;
::The [[VEHICLE_BANKING_COEF]] can vary between -1 and +1. When it’s positive then any positive rotation (by&lt;br /&gt;
the right-hand rule) about the roll-axis will effect a (negative) torque around the yaw-axis, making it turn to the&lt;br /&gt;
right -- that is the vehicle will lean into the turn, which is how real airplanes and motorcycle’s work. Negating&lt;br /&gt;
the banking coefficient will make it so that the vehicle leans to the outside of the turn (not very &amp;quot;physical&amp;quot; but&lt;br /&gt;
might allow interesting vehicles so why not?).&lt;br /&gt;
&lt;br /&gt;
::The [[VEHICLE_BANKING_MIX]] is a fake (i.e. non-physical) parameter that is useful for making banking&lt;br /&gt;
vehicles do what you want rather than what the laws of physics allow. For example, consider a real motorcycle...&lt;br /&gt;
it must be moving forward in order for it to turn while banking, however video-game motorcycles are often&lt;br /&gt;
configured to turn in place when at a dead stop -- because they’re often easier to control that way using the&lt;br /&gt;
limited interface of the keyboard or game controller. The [[VEHICLE_BANKING_MIX]] enables combinations of&lt;br /&gt;
both realistic and non-realistic banking by fuctioning as a slider between a banking that is correspondingly&lt;br /&gt;
totally static (0.0) and totally dynamic (1.0). By &amp;quot;static&amp;quot; we mean that the banking effect depends only on the&lt;br /&gt;
vehicle’s rotation about it’s roll-axis compared to &amp;quot;dynamic&amp;quot; where the banking is also proportional to it’s&lt;br /&gt;
velocity along it’s roll-axis. Finding the best value of the &amp;quot;mixture&amp;quot; will probably require trial and error.&lt;br /&gt;
&lt;br /&gt;
The time it takes for the banking behavior to defeat a pre-existing angular velocity about the world z-axis is&lt;br /&gt;
determined by the [[VEHICLE_BANKING_TIMESCALE]]. So if you want the vehicle to bank quickly then give it&lt;br /&gt;
a banking timescale of about a second or less, otherwise you can make a sluggish vehicle by giving it a timescale&lt;br /&gt;
of several seconds.&lt;br /&gt;
&lt;br /&gt;
==  Friction Timescales ==&lt;br /&gt;
&lt;br /&gt;
[[VEHICLE_LINEAR_FRICTION_TIMESCALE]] is a vector parameter that defines the timescales for the vehicle&lt;br /&gt;
to come to a complete stop along the three local axes of the vehicle’s reference frame. The timescale along each&lt;br /&gt;
axis is independent of the others. For example, a sliding ground car would probably have very little friction along&lt;br /&gt;
its x- and z-axes (so it can easily slide forward and fall down) while there would usually significant friction along&lt;br /&gt;
its y-axis:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, &amp;lt;1000, 1000, 3&amp;gt;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Remember that a longer timescale corresponds to a weaker friction, hence to effectively disable all linear friction&lt;br /&gt;
you would set all of the timescales to large values.&lt;br /&gt;
&lt;br /&gt;
Setting the linear friction as a scalar is allowed, and has the effect of setting all of the timescales to the same&lt;br /&gt;
value. Both code snippets below are equivalent, and both make friction negligible:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// set all linear friction timescales to 1000&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, &amp;lt;1000, 1000, 1000&amp;gt;);&lt;br /&gt;
// same as above, but fewer characters&lt;br /&gt;
llSetVehicleFloatParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, 1000);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
/[[VEHICLE_ANGULAR_FRICTION_TIMESCALE]] is also a vector parameter that defines the timescales for the&lt;br /&gt;
vehicle to stop rotating about the x-, y-, and z-axes, and are set and disabled in the same way as the linear friction.&lt;br /&gt;
&lt;br /&gt;
==  Buoyancy ==&lt;br /&gt;
&lt;br /&gt;
The vehicle has a built-in buoyancy feature that is independent of the[[llSetBuoyancy]] call. It is recommended that&lt;br /&gt;
the two buoyancies do not mix! To make a vehicle buoyant, set the [[VEHICLE_BUOYANCY]] parameter to&lt;br /&gt;
something between 0.0 (no buoyancy whatsoever) to 1.0 (full anti-gravity).&lt;br /&gt;
&lt;br /&gt;
The buoyancy behavior is independent of hover, however in order for hover to work without a large offset of the&lt;br /&gt;
[[VEHICLE_HOVER_HEIGHT]], the [[VEHICLE_BUOYANCY]] should be set to 1.0.&lt;br /&gt;
&lt;br /&gt;
It is not recommended that you mix vehicle buoyancy with the[[llSetBuoyancy]] script call. It would probably&lt;br /&gt;
cause the object to fly up into space.&lt;br /&gt;
&lt;br /&gt;
==  Hover ==&lt;br /&gt;
&lt;br /&gt;
The hover behavior is enabled by setting the [[VEHICLE_HOVER_TIMESCALE]] to a value less than 300&lt;br /&gt;
seconds; larger timescales totally disable it. Most vehicles will work best with short hover timescales of a few&lt;br /&gt;
seconds or less. The shorter the timescale, the faster the vehicle will slave to is target height. Note, that if the&lt;br /&gt;
values of [[VEHICLE_LINEAR_FRICTION_TIMESCALE]] may affect the speed of the hover.&lt;br /&gt;
&lt;br /&gt;
Hover is independent of buoyancy, however the [[VEHICLE_BUOYANCY]] should be set to 1.0, otherwise the&lt;br /&gt;
vehicle will not lift itself off of the ground until the [[VEHICLE_HOVER_HEIGHT]] is made large enough to&lt;br /&gt;
counter the acceleration of gravity, and the vehicle will never float all the way to its target height.&lt;br /&gt;
&lt;br /&gt;
The [[VEHICLE_HOVER_EFFICIENCY]] can be thought of as a slider between bouncy (0.0) and smoothed (1.0).&lt;br /&gt;
&lt;br /&gt;
When in the bouncy range the vehicle will tend to hover a little lower than its target height and the&lt;br /&gt;
[[VEHICLE_HOVER_TIMESCALE]] will be approximately the oscillation period of the bounce (the real period&lt;br /&gt;
will tend to be a little longer than the timescale).&lt;br /&gt;
&lt;br /&gt;
For performance reasons, until improvements are made to the Second Life physics engine the vehicles can only&lt;br /&gt;
hover over the terrain and water, so they will not be able to hover above objects made out of primitives, such as&lt;br /&gt;
bridges and houses. By default the hover behavior will float over terrain and water, however this can be changed&lt;br /&gt;
by setting some flags:&lt;br /&gt;
&lt;br /&gt;
If you wanted to make a boat you should set the [[VEHICLE_HOVER_WATER_ONLY]] flag, or if you wanted to&lt;br /&gt;
drive a hover tank under water you would use the [[VEHICLE_HOVER_TERRAIN_ONLY]] flag instead. Finally,&lt;br /&gt;
if you wanted to make a submarine or a balloon you would use the [[VEHICLE_HOVER_GLOBAL_HEIGHT]].&lt;br /&gt;
&lt;br /&gt;
Note that the flags are independent of each other and that setting two contradictory flags will have undefined&lt;br /&gt;
behavor. The flags are set using the script call[[llSetVehicleFlags()]].&lt;br /&gt;
&lt;br /&gt;
The [[VEHICLE_HOVER_HEIGHT]] determines how high the vehicle will hover over the terrain and/or water, or&lt;br /&gt;
the global height, and has a maximum value of 100 meters. Note that for hovering purposes the &amp;quot;center&amp;quot; of the&lt;br /&gt;
vehicle is its &amp;quot;center of mass&amp;quot; which is not always obvious to the untrained eye, and it changes when avatar’s sit&lt;br /&gt;
on the vehicle.&lt;br /&gt;
&lt;br /&gt;
==  Reference Frame ==&lt;br /&gt;
&lt;br /&gt;
The vehicle relies on the x- (at), y- (left), and z- (up) axes in order to figure out which way it preferres to move&lt;br /&gt;
and which end is up. By default these axes are identical to the local axes of the root primitive of the object,&lt;br /&gt;
however this means that the vehicle’s root primitive must, by default, be oriented to agree with the designed at,&lt;br /&gt;
left, and up axes of the vehicle. But, what if the vehicle object was already pre-built with the root primitive in&lt;br /&gt;
some non-trivial orientation relative to where the vehicle as a whole should move? This is where the&lt;br /&gt;
&lt;br /&gt;
[[VEHICLE_REFERENCE_FRAME]] parameter becomes useful; the vehicle’s axes can be arbitrarily reoriented&lt;br /&gt;
by setting this parameter.&lt;br /&gt;
&lt;br /&gt;
As an example, suppose you had built a rocket out of a big cylinder, a cone for the nose, and some stretched cut&lt;br /&gt;
boxes for the fins, then linked them all together with the cylinder as the root primitive. Ideally the rocket would&lt;br /&gt;
move nose-first, however the cylinder’s axis of symmetry is its local z-axis while the default &amp;quot;at-axis&amp;quot; of the&lt;br /&gt;
vehicle, the axis it will want to deflect to forward under angular deflection, is the local x-axis and points out from&lt;br /&gt;
the curved surface of the cylinder. The script code below will rotate the vehicle’s axes such that the local z-axis&lt;br /&gt;
becomes the &amp;quot;at-axis&amp;quot; and the local negative x-axis becomes the &amp;quot;up-axis&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// rotate the vehicle frame -PI/2 about the local y-axis (left-axis)&lt;br /&gt;
rotation rot =llEuler2Rot(0, PI/2, 0);&lt;br /&gt;
llSetVehicleRotationParam(VEHICLE_REFERENCE_FRAME, rot);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Another example of how the reference frame parameter could be used is to consider flying craft that uses the&lt;br /&gt;
vertical attractor for stability during flying but wants to use VTOL (vertical takeoff and landing). During flight&lt;br /&gt;
the craft’s dorsal axis should point up, but during landing its nose-axis should be up. To land the vehicle: while&lt;br /&gt;
the vertical attractor is in effect, rotate the existing [[VEHICLE_REFERENCE_FRAME]] by +PI/2 about the&lt;br /&gt;
left-axis, then the vehicle will pitch up such that it’s nose points toward the sky. The vehicle could be allowed to&lt;br /&gt;
fall to the landing pad under friction, or a decreasing hover effect.&lt;br /&gt;
&lt;br /&gt;
Catagories: {{LSLC|Vehicle|Tutorial}} {{LSLC|Tutorials|Vehicle}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Linden_Vehicle_Tutorial&amp;diff=33027</id>
		<title>Linden Vehicle Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Linden_Vehicle_Tutorial&amp;diff=33027"/>
		<updated>2007-09-26T21:53:44Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Header}}&lt;br /&gt;
&lt;br /&gt;
== Vehicles ==&lt;br /&gt;
&lt;br /&gt;
Vehicles are a new feature now available for use through LSL. This chapter will cover the basics of how vehicles&lt;br /&gt;
work, the terms used when describing vehicles, and a more thorough examination of the api available.&lt;br /&gt;
&lt;br /&gt;
There are several ways to make scripted objects move themselves around. One way is to turn the object into a&lt;br /&gt;
&amp;quot;vehicle&amp;quot;. This feature is versatile enough to make things that slide, hover, fly, and float. Some of the behaviors&lt;br /&gt;
that can be enabled are:&lt;br /&gt;
&lt;br /&gt;
*deflection of linear and angular velocity to preferred axis of motion&lt;br /&gt;
*asymmetric linear and angular friction&lt;br /&gt;
*hovering over terrain/water or at a global height&lt;br /&gt;
*banking on turns&lt;br /&gt;
*linear and angular motor for push and turning&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Each scripted object can have one vehicle behavior that is configurable through the[[llSetVehicleType]],&lt;br /&gt;
llSetVehicleFloatParam,llSetVehicleVectorParam,llSetVehicleRotationParam,llSetVehicleFlags, and&lt;br /&gt;
llRemoveVehicleFlags library calls.&lt;br /&gt;
&lt;br /&gt;
These script calls are described in more detail below, but the important thing to notice here is that the vehicle&lt;br /&gt;
behavior has several parameters that can be adjusted to change how the vehicle handles. Depending on the values&lt;br /&gt;
chosen the vehicle can veer like a boat in water, or ride like a sled on rails.&lt;br /&gt;
&lt;br /&gt;
Setting the vehicle flags allow you to make exceptions to some default behaviors. Some of these flags only have&lt;br /&gt;
an effect when certain behaviors are enabled. For example, the [[VEHICLE_FLAG_HOVER_WATER_ONLY]] will&lt;br /&gt;
make the vehicle ignore the height of the terrain, however it only makes a difference if the vehicle is hovering.&lt;br /&gt;
&lt;br /&gt;
== Warnings ==&lt;br /&gt;
&lt;br /&gt;
Vehicles are new in Second Life 1.1 and some of the details of their behavior may be changed as necessary to&lt;br /&gt;
ensure stability and user safety. In particular, many of the limits and defaults described in the appendices will&lt;br /&gt;
probably change and should not be relied upon in the long term.&lt;br /&gt;
&lt;br /&gt;
It is not recommended that you mix vehicle behavior with some of the other script calls that provide impulse and&lt;br /&gt;
forces to the object, especially[[llSetBuoyancy]],[[llSetForce]],[[llSetTorque]], and[[llSetHoverHeight]].&lt;br /&gt;
&lt;br /&gt;
While the following methods probably don’t cause any instabilities, their behavior may conflict with vehicles&lt;br /&gt;
and cause undesired and/or inconsistent results, so use[[llLookAt]],[[llRotLookAt]],[[llMoveToTarget]], and&lt;br /&gt;
[[llTargetOmega]] at your own risk.&lt;br /&gt;
&lt;br /&gt;
If you think you have found a bug relating to how vehicle’s work, one way to submit the problem is to give a&lt;br /&gt;
copy of the vehicle and script to Andrew Linden with comments or a notecard describing the problem. Please&lt;br /&gt;
name all submissions &amp;quot;Bugged Vehicle XX&amp;quot; where XX are your Second Life initials. The vehicle and script will&lt;br /&gt;
be examined at the earliest convenience.&lt;br /&gt;
&lt;br /&gt;
==  Definitions ==&lt;br /&gt;
&lt;br /&gt;
The terms &amp;quot;roll&amp;quot;, &amp;quot;pitch&amp;quot;, and &amp;quot;yaw&amp;quot; are often used to describe the modes of rotations that can happen to a&lt;br /&gt;
airplane or boat. They correspond to rotations about the local x-, y-, and z-axis respectively.&lt;br /&gt;
z-axis .&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Tait-Bryan_angles&lt;br /&gt;
&lt;br /&gt;
The right-hand-rule, often introduced in beginning physics courses, is used to define the direction of positive&lt;br /&gt;
rotation about any axis. As an example of how to use the right hand rule, consider a positive rotation about the&lt;br /&gt;
roll axis. To help visualize how such a rotation would move the airplane, place your right thumb parallel to the&lt;br /&gt;
plane’s roll-axis such that the thumb points in the positive x-direction, then curl the four fingers into a fist. Your&lt;br /&gt;
fingers will be pointing in the direction that the plane will spin.&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Right_hand_rule&lt;br /&gt;
&lt;br /&gt;
Many of the parameters that control a vehicle’s behavior are of the form:&lt;br /&gt;
&lt;br /&gt;
VEHICLE_&#039;&#039;&#039;BEHAVIOR&#039;&#039;&#039;_TIMESCALE&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;BEHAVIOR&#039;&#039;&#039; ’s &amp;quot;timescale&amp;quot; can usually be understood as the time for the&lt;br /&gt;
behavior to push, twist, or otherwise affect the vehicle such that the difference between what it is doing, and&lt;br /&gt;
what it is supposed to be doing, has been reduced to 1/e of what it was, where &amp;quot;e&amp;quot; is the natural exponent&lt;br /&gt;
(approximately 2.718281828). In other words, it is the timescale for exponential decay toward full compliance to&lt;br /&gt;
the desired behavior. When you want the vehicle to be very responsive use a short timescale of one second or&lt;br /&gt;
less, and if you want to disable a behavior then set the timescale to a very large number like 300 (5 minutes) or&lt;br /&gt;
more. Note, for stability reasons, there is usually a limit to how small a timescale is allowed to be, and is usually&lt;br /&gt;
on the order of a tenth of a second. Setting a timescale to zero is safe and is always equivalent to setting it to its&lt;br /&gt;
minimum. Any feature with a timescale can be effectively disabled by setting the timescale so large that it would&lt;br /&gt;
take them all day to have any effect.&lt;br /&gt;
&lt;br /&gt;
==  Setting the Vehicle Type ==&lt;br /&gt;
&lt;br /&gt;
Before any vehicle parameters can be set the vehicle behavior must first be enabled. It is enabled by calling&lt;br /&gt;
[[llSetVehicleType]] with any &#039;&#039;&#039;VEHICLE_TYPE_*&#039;&#039;&#039;, except [[VEHICLE_TYPE_NONE]] which will disable the&lt;br /&gt;
vehicle. See the {{LSLGC|Vehicle|vehicle types}} constants section for currently available types. More types will be available soon.&lt;br /&gt;
&lt;br /&gt;
Setting the vehicle type is necessary for enabling the vehicle behavior and sets all of the parameters to its default&lt;br /&gt;
values. For each vehicle type listed we provide the corresponding equivalent code in long format. Is is important&lt;br /&gt;
to realize that the defaults are not the optimal settings for any of these vehicle types and that they will definitely&lt;br /&gt;
be changed in the future. Do not rely on these values to be constant until specified.&lt;br /&gt;
&lt;br /&gt;
Should you want to make a unique or experimental vehicle you will still have to enable the vehicle behavior with&lt;br /&gt;
one of the default types first, after which you will be able to change any of the parameters or flags within the&lt;br /&gt;
allowed ranges.&lt;br /&gt;
&lt;br /&gt;
Setting the vehicle type does not automatically take controls or otherwise move the object. However should you&lt;br /&gt;
enable the vehicle behavior while the object is free to move and parked on a hill then it may start to slide away.&lt;br /&gt;
&lt;br /&gt;
We’re looking for new and better default vehicle types. If you think you’ve found a set of parameters that make a&lt;br /&gt;
better car, boat, or any other default type of vehicle then you may submit your proposed list of settings to&lt;br /&gt;
Andrew Linden via a script or notecard.&lt;br /&gt;
&lt;br /&gt;
==  Linear and Angular Deflection ==&lt;br /&gt;
&lt;br /&gt;
A common feature of real vehicles is their tendency to move along &amp;quot;preferred axes of motion&amp;quot;. That is, due to&lt;br /&gt;
their wheels, wings, shape, or method of propulsion they tend to push or redirect themselves along axes that are&lt;br /&gt;
static in the vehicle’s local frame. This general feature defines a class of vehicles and included in this category a&lt;br /&gt;
common dart is a &amp;quot;vehicle&amp;quot;: it has fins in the back such that if it were to tumble in the air it would eventually&lt;br /&gt;
align itself to move point-forward -- we’ll call this alignment effect angular deflection.&lt;br /&gt;
&lt;br /&gt;
A wheeled craft exhibits a different effect: when a skateboard is pushed in some direction it will tend to redirect&lt;br /&gt;
the resultant motion along that which it is free to roll -- we’ll call this effect linear deflection.&lt;br /&gt;
&lt;br /&gt;
So a typical Second Life vehicle is an object that exhibits linear and/or angular deflection along the &amp;quot;preferential&lt;br /&gt;
axes of motion&amp;quot;. The default preferential axes of motion are the local x- (at), y- (left), and z- (up) axes of the&lt;br /&gt;
local frame of the vehicle’s root primitive. The deflection behaviors relate to the x-axis (at): linear deflection will&lt;br /&gt;
tend to rotate its velocity until it points along it’s positive local x-axis while the angular deflection will tend to&lt;br /&gt;
reorient the vehicle such that it’s x-axis points in the direction that it is moving. The other axes are relevant to&lt;br /&gt;
vehicle behaviors that are described later, such as the vertical attractor which tries to keep a vehicle’s local z-axis&lt;br /&gt;
pointed toward the world z-axis (up). The vehicle axes can be rotated relative to the object’s actual local axes by&lt;br /&gt;
using the [[VEHICLE_REFERENCE_FRAME]] parameter, however that is an advanced feature and is covered in&lt;br /&gt;
detail in a later section of these documents.&lt;br /&gt;
&lt;br /&gt;
Depending on the vehicle it might be desirable to have lots of linear and/or angular delfection or not. The speed&lt;br /&gt;
of the deflections are controlled by setting the relevant parameters using the[[llSetVehicleFloatParam]] script call.&lt;br /&gt;
&lt;br /&gt;
Each variety of deflection has a &amp;quot;timescale&amp;quot; parameter that determines how quickly a full deflection happens.&lt;br /&gt;
&lt;br /&gt;
Basically the timescale it the time coefficient for exponential decay toward full deflection. So, a vehicle that&lt;br /&gt;
deflects quickly should have a small timescale. For instance, a typical dart might have a angular deflection&lt;br /&gt;
timescale of a couple of seconds but a linear deflection of several seconds; it will tend to reorient itself before it&lt;br /&gt;
changes direction. To set the deflection timescales of a dart you might use the lines below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetVehicleFloatParam(VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 2.0);&lt;br /&gt;
llSetVehicleFloatParam(VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 6.0);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each variety of deflection has an &amp;quot;efficiency&amp;quot; parameter that is a slider between 0.0 and 1.0. Unlike the other&lt;br /&gt;
efficiency parameter of other vehicle behaviors, the deflection efficiencies do not slide between &amp;quot;bouncy&amp;quot; and&lt;br /&gt;
&amp;quot;damped&amp;quot;, but instead slide from &amp;quot;no deflection whatsoever&amp;quot; (0.0) to &amp;quot;maximum deflection&amp;quot; (1.0). That is, they&lt;br /&gt;
behave much like the deflection timescales, however they are normalized to the range between 0.0 and 1.0.&lt;br /&gt;
&lt;br /&gt;
==  Moving the Vehicle ==&lt;br /&gt;
&lt;br /&gt;
Once enabled, a vehicle can be pushed and rotated by external forces and/or from script calls such as&lt;br /&gt;
[[llApplyImpulse]], however linear and angular motors have been built in to make motion easier and smoother.&lt;br /&gt;
Their directions can be set using the[[llSetVehicleVectorParam]] call. For example, to make the vehicle try to move&lt;br /&gt;
at 5 meters/second along its local x-axis (the default look-at direction) you would put the following line in your&lt;br /&gt;
script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, &amp;lt;5, 0, 0&amp;gt;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To prevent vehicles from moving too fast the magnitude of the linear motor is clamped to be no larger than about&lt;br /&gt;
30 meters/second. Note that this is clamped mostly because of limitations of the physics engine, and may be&lt;br /&gt;
raised later when possible.&lt;br /&gt;
&lt;br /&gt;
Setting the motor speed is not enough to enable all interesting vehicles. For example, some will want a car that&lt;br /&gt;
immediately gets up to the speed they want, while others will want a boat that slowly climbs up to its maximum&lt;br /&gt;
velocity. To control this effect you can use the [[VEHICLE_LINEAR_MOTOR_TIMESCALE]] parameter.&lt;br /&gt;
&lt;br /&gt;
Basically the &amp;quot;timescale&amp;quot; of a motor is the time constant for the vehicle to exponentially accelerate toward its full&lt;br /&gt;
speed.&lt;br /&gt;
&lt;br /&gt;
What would happen if you were to accidentally set the vehicle’s linear velocity to maximum possible speed and&lt;br /&gt;
then let go? It would run away and never stop, right? Not necessarily: an automatic &amp;quot;motor decay&amp;quot; has been built&lt;br /&gt;
in such that all motors will gradually decrease their effectiveness after being set.&lt;br /&gt;
&lt;br /&gt;
Each time the linear motor’s vector is set its &amp;quot;grip&amp;quot; immediately starts to decay exponentially with a timescale&lt;br /&gt;
determined by the [[VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE]], such that after enough time the&lt;br /&gt;
motor ceases to have any effect. This decay timescale serves two purposes. First, since it cannot be set longer&lt;br /&gt;
than 120 seconds, and is always enabled it gaurantees that a vehicle will not push itself about forever in the&lt;br /&gt;
absence of active control (from keyboard commands or some logic loop in the script). Second, it can be used to&lt;br /&gt;
push some vehicles around using a simple impulse model. That is, rather than setting the motor &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot;&lt;br /&gt;
depending on whether a particular key is pressed &amp;quot;down&amp;quot; or &amp;quot;up&amp;quot; the decay timescale can be set short and the&lt;br /&gt;
motor can be set &amp;quot;on&amp;quot; whenever the key transitions from &amp;quot;up&amp;quot; to &amp;quot;down&amp;quot; and allowed to automatically decay.&lt;br /&gt;
&lt;br /&gt;
Since the motor’s effectiveness is reset whenever the motor’s vector is set, then setting it to a vector of length&lt;br /&gt;
zero is different from allowing it to decay completely. The first case will cause the vehicle to try to reach zero&lt;br /&gt;
velocity, while the second will leave the motor impotent.&lt;br /&gt;
&lt;br /&gt;
The two motor timescales have very similar names, but have different effects, so try not to get them confused.&lt;br /&gt;
&lt;br /&gt;
::[[VEHICLE_LINEAR_MOTOR_TIMESCALE]] is the time for motor to &amp;quot;win&amp;quot;, and&lt;br /&gt;
&lt;br /&gt;
::[[VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE]] is the time for the motor’s &amp;quot;effectiveness&amp;quot; to decay&lt;br /&gt;
toward zero. If you set one when you think you are changing the other you will have frustrating results. Also, if&lt;br /&gt;
the motor’s decay timescale is shorter than the regular timescale, then the effective magnitude of the motor&lt;br /&gt;
vector will be diminished.&lt;br /&gt;
&lt;br /&gt;
==  Steering the Vehicle ==&lt;br /&gt;
&lt;br /&gt;
Much like the linear motor, there is also an angular motor that is always on, and whose direction and magnitude&lt;br /&gt;
can be set. For example, to make a vehicle turn at 5 degrees/sec around it’s local z-axis (its up-axis) you might&lt;br /&gt;
add the following lines to its script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vector angular_velocity = &amp;lt;0, 0, 5 * PI / 180&amp;gt;;&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DIRECTION, angular_velocity);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The magnitude of the angular motor is capped to be no more than two rotations per second (4*PI radians/sec).&lt;br /&gt;
&lt;br /&gt;
Also like the linear motor it has an efficiency parameter, [[VEHICLE_ANGULAR_MOTOR_TIMESCALE]], and a&lt;br /&gt;
motor decay parameter, [[VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE]], which is set to themaximum possible value of 120 seconds by default.&lt;br /&gt;
&lt;br /&gt;
When steering a vehicle you probably don’t want it to turn very far or for very long. One way to do it using the&lt;br /&gt;
angular motor would be to leave the decay timescale long, enable a significant amount of angular friction (to&lt;br /&gt;
quickly slow the vehicle down when the motor is turned off) then set the angular motor to a large vector on a key&lt;br /&gt;
press, and set it to zero when the key is released. Another way to do it is to set the&lt;br /&gt;
[[VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE]] to a short value and push the vehicle about with a&lt;br /&gt;
more impulsive method that sets the motor fast on a key press down (and optionally setting the motor to zero on&lt;br /&gt;
a key up) relying on the automatic exponential decay of the motor’s effectiveness rather than a constant angular&lt;br /&gt;
friction.&lt;br /&gt;
&lt;br /&gt;
Setting the angular motor to zero magnitude is different from allowing it to decay. When the motor completely&lt;br /&gt;
decays it no longer affects the motion of the vehicle, however setting it to zero will reset the &amp;quot;grip&amp;quot; of the vehicle&lt;br /&gt;
and will make the vehicle try to achieve zero angular velocity.&lt;br /&gt;
&lt;br /&gt;
For some vehicles it will be possible to use the &amp;quot;banking feature&amp;quot; to turn. &amp;quot;Banking&amp;quot; is what airplanes and&lt;br /&gt;
motorcycles do when they turn. When a banking vehicle twists about its roll-axis there is a resultant spin around&lt;br /&gt;
its yaw-axis. Banking is only available when using the &amp;quot;vertical attractor&amp;quot; which is described below.&lt;br /&gt;
&lt;br /&gt;
==  The Vertical Attractor ==&lt;br /&gt;
&lt;br /&gt;
Some vehicles, like boats, should always keep their up-side up. This can be done by enabling the &amp;quot;vertical&lt;br /&gt;
attractor&amp;quot; behavior that springs the vehicle’s local z-axis to the world z-axis (a.k.a. &amp;quot;up&amp;quot;). To take advantage of&lt;br /&gt;
this feature you would set the [[VEHICLE_VERTICAL_ATTRACTION_TIMESCALE]] to control the period of&lt;br /&gt;
the spring frequency, and then set the [[VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY]] to control the&lt;br /&gt;
damping. An efficiency of 0.0 will cause the spring to wobble around its equilibrium, while an efficiency of 1.0&lt;br /&gt;
will cause the spring to reach it’s equilibrium with exponential decay.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 4.0);&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 0.5);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The vertical attractor is disabled by setting its timescale to anything larger than 300 seconds.&lt;br /&gt;
&lt;br /&gt;
Note that by default the vertical attractor will prevent the vehicle from diving and climbing. So, if you wanted to&lt;br /&gt;
make a airplane you would probably want to unlock the attractor around the pitch axis by setting the&lt;br /&gt;
[[VEHICLE_FLAG_LIMIT_ROLL_ONLY]] bit:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetVehicleFlags(VEHICLE_FLAG_LIMIT_ROLL_ONLY);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Banking ==&lt;br /&gt;
&lt;br /&gt;
The vertical attractor feature must be enabled in order for the banking behavior to function. The way banking&lt;br /&gt;
works is this: a rotation around the vehicle’s roll-axis will produce a angular velocity around the yaw-axis,&lt;br /&gt;
causing the vehicle to turn. The magnitude of the yaw effect will be proportional to the&lt;br /&gt;
&lt;br /&gt;
::[[VEHICLE_BANKING_COEF]], the angle of the roll rotation, and sometimes the vehicle’s velocity along it’s&lt;br /&gt;
preferred axis of motion.&lt;br /&gt;
&lt;br /&gt;
::The [[VEHICLE_BANKING_COEF]] can vary between -1 and +1. When it’s positive then any positive rotation (by&lt;br /&gt;
the right-hand rule) about the roll-axis will effect a (negative) torque around the yaw-axis, making it turn to the&lt;br /&gt;
right -- that is the vehicle will lean into the turn, which is how real airplanes and motorcycle’s work. Negating&lt;br /&gt;
the banking coefficient will make it so that the vehicle leans to the outside of the turn (not very &amp;quot;physical&amp;quot; but&lt;br /&gt;
might allow interesting vehicles so why not?).&lt;br /&gt;
&lt;br /&gt;
::The [[VEHICLE_BANKING_MIX]] is a fake (i.e. non-physical) parameter that is useful for making banking&lt;br /&gt;
vehicles do what you want rather than what the laws of physics allow. For example, consider a real motorcycle...&lt;br /&gt;
it must be moving forward in order for it to turn while banking, however video-game motorcycles are often&lt;br /&gt;
configured to turn in place when at a dead stop -- because they’re often easier to control that way using the&lt;br /&gt;
limited interface of the keyboard or game controller. The [[VEHICLE_BANKING_MIX]] enables combinations of&lt;br /&gt;
both realistic and non-realistic banking by fuctioning as a slider between a banking that is correspondingly&lt;br /&gt;
totally static (0.0) and totally dynamic (1.0). By &amp;quot;static&amp;quot; we mean that the banking effect depends only on the&lt;br /&gt;
vehicle’s rotation about it’s roll-axis compared to &amp;quot;dynamic&amp;quot; where the banking is also proportional to it’s&lt;br /&gt;
velocity along it’s roll-axis. Finding the best value of the &amp;quot;mixture&amp;quot; will probably require trial and error.&lt;br /&gt;
&lt;br /&gt;
The time it takes for the banking behavior to defeat a pre-existing angular velocity about the world z-axis is&lt;br /&gt;
determined by the [[VEHICLE_BANKING_TIMESCALE]]. So if you want the vehicle to bank quickly then give it&lt;br /&gt;
a banking timescale of about a second or less, otherwise you can make a sluggish vehicle by giving it a timescale&lt;br /&gt;
of several seconds.&lt;br /&gt;
&lt;br /&gt;
==  Friction Timescales ==&lt;br /&gt;
&lt;br /&gt;
[[VEHICLE_LINEAR_FRICTION_TIMESCALE]] is a vector parameter that defines the timescales for the vehicle&lt;br /&gt;
to come to a complete stop along the three local axes of the vehicle’s reference frame. The timescale along each&lt;br /&gt;
axis is independent of the others. For example, a sliding ground car would probably have very little friction along&lt;br /&gt;
its x- and z-axes (so it can easily slide forward and fall down) while there would usually significant friction along&lt;br /&gt;
its y-axis:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, &amp;lt;1000, 1000, 3&amp;gt;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Remember that a longer timescale corresponds to a weaker friction, hence to effectively disable all linear friction&lt;br /&gt;
you would set all of the timescales to large values.&lt;br /&gt;
&lt;br /&gt;
Setting the linear friction as a scalar is allowed, and has the effect of setting all of the timescales to the same&lt;br /&gt;
value. Both code snippets below are equivalent, and both make friction negligible:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// set all linear friction timescales to 1000&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, &amp;lt;1000, 1000, 1000&amp;gt;);&lt;br /&gt;
// same as above, but fewer characters&lt;br /&gt;
llSetVehicleFloatParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, 1000);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
/[[VEHICLE_ANGULAR_FRICTION_TIMESCALE]] is also a vector parameter that defines the timescales for the&lt;br /&gt;
vehicle to stop rotating about the x-, y-, and z-axes, and are set and disabled in the same way as the linear friction.&lt;br /&gt;
&lt;br /&gt;
==  Buoyancy ==&lt;br /&gt;
&lt;br /&gt;
The vehicle has a built-in buoyancy feature that is independent of the[[llSetBuoyancy]] call. It is recommended that&lt;br /&gt;
the two buoyancies do not mix! To make a vehicle buoyant, set the [[VEHICLE_BUOYANCY]] parameter to&lt;br /&gt;
something between 0.0 (no buoyancy whatsoever) to 1.0 (full anti-gravity).&lt;br /&gt;
&lt;br /&gt;
The buoyancy behavior is independent of hover, however in order for hover to work without a large offset of the&lt;br /&gt;
[[VEHICLE_HOVER_HEIGHT]], the [[VEHICLE_BUOYANCY]] should be set to 1.0.&lt;br /&gt;
&lt;br /&gt;
It is not recommended that you mix vehicle buoyancy with the[[llSetBuoyancy]] script call. It would probably&lt;br /&gt;
cause the object to fly up into space.&lt;br /&gt;
&lt;br /&gt;
==  Hover ==&lt;br /&gt;
&lt;br /&gt;
The hover behavior is enabled by setting the [[VEHICLE_HOVER_TIMESCALE]] to a value less than 300&lt;br /&gt;
seconds; larger timescales totally disable it. Most vehicles will work best with short hover timescales of a few&lt;br /&gt;
seconds or less. The shorter the timescale, the faster the vehicle will slave to is target height. Note, that if the&lt;br /&gt;
values of [[VEHICLE_LINEAR_FRICTION_TIMESCALE]] may affect the speed of the hover.&lt;br /&gt;
&lt;br /&gt;
Hover is independent of buoyancy, however the [[VEHICLE_BUOYANCY]] should be set to 1.0, otherwise the&lt;br /&gt;
vehicle will not lift itself off of the ground until the [[VEHICLE_HOVER_HEIGHT]] is made large enough to&lt;br /&gt;
counter the acceleration of gravity, and the vehicle will never float all the way to its target height.&lt;br /&gt;
&lt;br /&gt;
The [[VEHICLE_HOVER_EFFICIENCY]] can be thought of as a slider between bouncy (0.0) and smoothed (1.0).&lt;br /&gt;
&lt;br /&gt;
When in the bouncy range the vehicle will tend to hover a little lower than its target height and the&lt;br /&gt;
[[VEHICLE_HOVER_TIMESCALE]] will be approximately the oscillation period of the bounce (the real period&lt;br /&gt;
will tend to be a little longer than the timescale).&lt;br /&gt;
&lt;br /&gt;
For performance reasons, until improvements are made to the Second Life physics engine the vehicles can only&lt;br /&gt;
hover over the terrain and water, so they will not be able to hover above objects made out of primitives, such as&lt;br /&gt;
bridges and houses. By default the hover behavior will float over terrain and water, however this can be changed&lt;br /&gt;
by setting some flags:&lt;br /&gt;
&lt;br /&gt;
If you wanted to make a boat you should set the [[VEHICLE_HOVER_WATER_ONLY]] flag, or if you wanted to&lt;br /&gt;
drive a hover tank under water you would use the [[VEHICLE_HOVER_TERRAIN_ONLY]] flag instead. Finally,&lt;br /&gt;
if you wanted to make a submarine or a balloon you would use the [[VEHICLE_HOVER_GLOBAL_HEIGHT]].&lt;br /&gt;
&lt;br /&gt;
Note that the flags are independent of each other and that setting two contradictory flags will have undefined&lt;br /&gt;
behavor. The flags are set using the script call[[llSetVehicleFlags()]].&lt;br /&gt;
&lt;br /&gt;
The [[VEHICLE_HOVER_HEIGHT]] determines how high the vehicle will hover over the terrain and/or water, or&lt;br /&gt;
the global height, and has a maximum value of 100 meters. Note that for hovering purposes the &amp;quot;center&amp;quot; of the&lt;br /&gt;
vehicle is its &amp;quot;center of mass&amp;quot; which is not always obvious to the untrained eye, and it changes when avatar’s sit&lt;br /&gt;
on the vehicle.&lt;br /&gt;
&lt;br /&gt;
==  Reference Frame ==&lt;br /&gt;
&lt;br /&gt;
The vehicle relies on the x- (at), y- (left), and z- (up) axes in order to figure out which way it preferres to move&lt;br /&gt;
and which end is up. By default these axes are identical to the local axes of the root primitive of the object,&lt;br /&gt;
however this means that the vehicle’s root primitive must, by default, be oriented to agree with the designed at,&lt;br /&gt;
left, and up axes of the vehicle. But, what if the vehicle object was already pre-built with the root primitive in&lt;br /&gt;
some non-trivial orientation relative to where the vehicle as a whole should move? This is where the&lt;br /&gt;
&lt;br /&gt;
[[VEHICLE_REFERENCE_FRAME]] parameter becomes useful; the vehicle’s axes can be arbitrarily reoriented&lt;br /&gt;
by setting this parameter.&lt;br /&gt;
&lt;br /&gt;
As an example, suppose you had built a rocket out of a big cylinder, a cone for the nose, and some stretched cut&lt;br /&gt;
boxes for the fins, then linked them all together with the cylinder as the root primitive. Ideally the rocket would&lt;br /&gt;
move nose-first, however the cylinder’s axis of symmetry is its local z-axis while the default &amp;quot;at-axis&amp;quot; of the&lt;br /&gt;
vehicle, the axis it will want to deflect to forward under angular deflection, is the local x-axis and points out from&lt;br /&gt;
the curved surface of the cylinder. The script code below will rotate the vehicle’s axes such that the local z-axis&lt;br /&gt;
becomes the &amp;quot;at-axis&amp;quot; and the local negative x-axis becomes the &amp;quot;up-axis&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// rotate the vehicle frame -PI/2 about the local y-axis (left-axis)&lt;br /&gt;
rotation rot =llEuler2Rot(0, PI/2, 0);&lt;br /&gt;
llSetVehicleRotationParam(VEHICLE_REFERENCE_FRAME, rot);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Another example of how the reference frame parameter could be used is to consider flying craft that uses the&lt;br /&gt;
vertical attractor for stability during flying but wants to use VTOL (vertical takeoff and landing). During flight&lt;br /&gt;
the craft’s dorsal axis should point up, but during landing its nose-axis should be up. To land the vehicle: while&lt;br /&gt;
the vertical attractor is in effect, rotate the existing [[VEHICLE_REFERENCE_FRAME]] by +PI/2 about the&lt;br /&gt;
left-axis, then the vehicle will pitch up such that it’s nose points toward the sky. The vehicle could be allowed to&lt;br /&gt;
fall to the landing pad under friction, or a decreasing hover effect.&lt;br /&gt;
&lt;br /&gt;
Catagories: {{LSLC|Vehicle|Tutorial}} {{LSLC|Tutorials|Vehicle}}&lt;br /&gt;
{{LSLGC|Vehicle}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlRemoveVehicleFlags&amp;diff=33022</id>
		<title>LlRemoveVehicleFlags</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlRemoveVehicleFlags&amp;diff=33022"/>
		<updated>2007-09-26T21:50:26Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=237|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llRemoveVehicleFlags&lt;br /&gt;
|p1_type=integer|p1_name=flags|p1_desc=mask of VEHICLE_FLAG_* flags&lt;br /&gt;
|func_footnote|func_desc=Removes the enabled bits in &#039;flags&#039;&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats&lt;br /&gt;
|constants={{LSL Constants/Vehicle Flags}}&lt;br /&gt;
|examples&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llSetVehicleFlags]]|Sets vehicle flags}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles=[[Linden Vehicle Tutorial]]&lt;br /&gt;
|notes&lt;br /&gt;
|deprecated&lt;br /&gt;
|cat1=Vehicle&lt;br /&gt;
|cat2&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSetVehicleFlags&amp;diff=33019</id>
		<title>LlSetVehicleFlags</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSetVehicleFlags&amp;diff=33019"/>
		<updated>2007-09-26T21:48:53Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=236|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llSetVehicleFlags&lt;br /&gt;
|p1_type=integer|p1_name=flags|p1_desc=mask of VEHICLE_FLAG_* flags&lt;br /&gt;
|func_footnote&lt;br /&gt;
|func_desc=Sets the enabled bits in &#039;&#039;&#039;flags&#039;&#039;&#039;&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats&lt;br /&gt;
|constants={{LSL Constants/Vehicle Flags}}&lt;br /&gt;
|examples&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llRemoveVehicleFlags]]|Remove vehicle flags}}&lt;br /&gt;
|also_events&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_articles=[[Linden Vehicle Tutorial]]&lt;br /&gt;
|notes&lt;br /&gt;
|permission&lt;br /&gt;
|negative_index&lt;br /&gt;
|sort=SetVehicleFlags&lt;br /&gt;
|cat1=Vehicle&lt;br /&gt;
|cat2&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSetVehicleFloatParam&amp;diff=33017</id>
		<title>LlSetVehicleFloatParam</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSetVehicleFloatParam&amp;diff=33017"/>
		<updated>2007-09-26T21:48:31Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=233|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llSetVehicleFloatParam&lt;br /&gt;
|p1_type=integer|p1_name=param|p1_desc=VEHICLE_* flag&lt;br /&gt;
|p2_type=float|p2_name=value&lt;br /&gt;
|func_footnote&lt;br /&gt;
|func_desc=Sets the vehicle float parameter &#039;&#039;&#039;param&#039;&#039;&#039; to &#039;&#039;&#039;value&#039;&#039;&#039;.&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats&lt;br /&gt;
|constants={{LSL Constants/Vehicle|type=float}}&lt;br /&gt;
|examples&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||{{LSLG|llSetVehicleRotationParam}}|Sets a vehicle rotation parameter}}&lt;br /&gt;
{{LSL DefineRow||{{LSLG|llSetVehicleVectorParam}}|Sets a vehicle vector parameter}}&lt;br /&gt;
|also_events&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_articles=[[Linden Vehicle Tutorial]]&lt;br /&gt;
|notes&lt;br /&gt;
|permission&lt;br /&gt;
|negative_index&lt;br /&gt;
|sort=SetVehicleFloatParam&lt;br /&gt;
|cat1=Vehicle&lt;br /&gt;
|cat2&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSetVehicleRotationParam&amp;diff=33014</id>
		<title>LlSetVehicleRotationParam</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSetVehicleRotationParam&amp;diff=33014"/>
		<updated>2007-09-26T21:44:50Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=235|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llSetVehicleRotationParam&lt;br /&gt;
|p1_type=integer|p1_name=param|p1_desc=VEHICLE_* flag&lt;br /&gt;
|p2_type=rotation|p2_name=rot&lt;br /&gt;
|func_footnote&lt;br /&gt;
|func_desc=Sets the vehicle rotation parameter &#039;&#039;&#039;param&#039;&#039;&#039; to &#039;&#039;&#039;rot&#039;&#039;&#039;.&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats&lt;br /&gt;
|constants={{LSL Constants/Vehicle|type=rotation}}&lt;br /&gt;
|examples&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions={{LSL DefineRow||{{LSLG|llSetVehicleFloatParam}}|Sets a vehicle float parameter}}&lt;br /&gt;
{{LSL DefineRow||{{LSLG|llSetVehicleVectorParam}}|Sets a vehicle vector parmeter}}&lt;br /&gt;
|also_events&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_articles=[[Linden Vehicle Tutorial]]&lt;br /&gt;
|notes&lt;br /&gt;
|permission&lt;br /&gt;
|negative_index&lt;br /&gt;
|sort=SetVehicleRotationParam&lt;br /&gt;
|cat1=Vehicle&lt;br /&gt;
|cat2&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Linden_Vehicle_Tutorial&amp;diff=33013</id>
		<title>Linden Vehicle Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Linden_Vehicle_Tutorial&amp;diff=33013"/>
		<updated>2007-09-26T21:44:23Z</updated>

		<summary type="html">&lt;p&gt;Ralph Doctorow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Header}}&lt;br /&gt;
&lt;br /&gt;
== Vehicles{{LSLC|Vehicle|Tutorial}} ==&lt;br /&gt;
&lt;br /&gt;
Vehicles are a new feature now available for use through LSL. This chapter will cover the basics of how vehicles&lt;br /&gt;
work, the terms used when describing vehicles, and a more thorough examination of the api available.&lt;br /&gt;
&lt;br /&gt;
There are several ways to make scripted objects move themselves around. One way is to turn the object into a&lt;br /&gt;
&amp;quot;vehicle&amp;quot;. This feature is versatile enough to make things that slide, hover, fly, and float. Some of the behaviors&lt;br /&gt;
that can be enabled are:&lt;br /&gt;
&lt;br /&gt;
*deflection of linear and angular velocity to preferred axis of motion&lt;br /&gt;
*asymmetric linear and angular friction&lt;br /&gt;
*hovering over terrain/water or at a global height&lt;br /&gt;
*banking on turns&lt;br /&gt;
*linear and angular motor for push and turning&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Each scripted object can have one vehicle behavior that is configurable through the[[llSetVehicleType]],&lt;br /&gt;
llSetVehicleFloatParam,llSetVehicleVectorParam,llSetVehicleRotationParam,llSetVehicleFlags, and&lt;br /&gt;
llRemoveVehicleFlags library calls.&lt;br /&gt;
&lt;br /&gt;
These script calls are described in more detail below, but the important thing to notice here is that the vehicle&lt;br /&gt;
behavior has several parameters that can be adjusted to change how the vehicle handles. Depending on the values&lt;br /&gt;
chosen the vehicle can veer like a boat in water, or ride like a sled on rails.&lt;br /&gt;
&lt;br /&gt;
Setting the vehicle flags allow you to make exceptions to some default behaviors. Some of these flags only have&lt;br /&gt;
an effect when certain behaviors are enabled. For example, the [[VEHICLE_FLAG_HOVER_WATER_ONLY]] will&lt;br /&gt;
make the vehicle ignore the height of the terrain, however it only makes a difference if the vehicle is hovering.&lt;br /&gt;
&lt;br /&gt;
== Warnings ==&lt;br /&gt;
&lt;br /&gt;
Vehicles are new in Second Life 1.1 and some of the details of their behavior may be changed as necessary to&lt;br /&gt;
ensure stability and user safety. In particular, many of the limits and defaults described in the appendices will&lt;br /&gt;
probably change and should not be relied upon in the long term.&lt;br /&gt;
&lt;br /&gt;
It is not recommended that you mix vehicle behavior with some of the other script calls that provide impulse and&lt;br /&gt;
forces to the object, especially[[llSetBuoyancy]],[[llSetForce]],[[llSetTorque]], and[[llSetHoverHeight]].&lt;br /&gt;
&lt;br /&gt;
While the following methods probably don’t cause any instabilities, their behavior may conflict with vehicles&lt;br /&gt;
and cause undesired and/or inconsistent results, so use[[llLookAt]],[[llRotLookAt]],[[llMoveToTarget]], and&lt;br /&gt;
[[llTargetOmega]] at your own risk.&lt;br /&gt;
&lt;br /&gt;
If you think you have found a bug relating to how vehicle’s work, one way to submit the problem is to give a&lt;br /&gt;
copy of the vehicle and script to Andrew Linden with comments or a notecard describing the problem. Please&lt;br /&gt;
name all submissions &amp;quot;Bugged Vehicle XX&amp;quot; where XX are your Second Life initials. The vehicle and script will&lt;br /&gt;
be examined at the earliest convenience.&lt;br /&gt;
&lt;br /&gt;
==  Definitions ==&lt;br /&gt;
&lt;br /&gt;
The terms &amp;quot;roll&amp;quot;, &amp;quot;pitch&amp;quot;, and &amp;quot;yaw&amp;quot; are often used to describe the modes of rotations that can happen to a&lt;br /&gt;
airplane or boat. They correspond to rotations about the local x-, y-, and z-axis respectively.&lt;br /&gt;
z-axis .&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Tait-Bryan_angles&lt;br /&gt;
&lt;br /&gt;
The right-hand-rule, often introduced in beginning physics courses, is used to define the direction of positive&lt;br /&gt;
rotation about any axis. As an example of how to use the right hand rule, consider a positive rotation about the&lt;br /&gt;
roll axis. To help visualize how such a rotation would move the airplane, place your right thumb parallel to the&lt;br /&gt;
plane’s roll-axis such that the thumb points in the positive x-direction, then curl the four fingers into a fist. Your&lt;br /&gt;
fingers will be pointing in the direction that the plane will spin.&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Right_hand_rule&lt;br /&gt;
&lt;br /&gt;
Many of the parameters that control a vehicle’s behavior are of the form:&lt;br /&gt;
&lt;br /&gt;
VEHICLE_&#039;&#039;&#039;BEHAVIOR&#039;&#039;&#039;_TIMESCALE&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;BEHAVIOR&#039;&#039;&#039; ’s &amp;quot;timescale&amp;quot; can usually be understood as the time for the&lt;br /&gt;
behavior to push, twist, or otherwise affect the vehicle such that the difference between what it is doing, and&lt;br /&gt;
what it is supposed to be doing, has been reduced to 1/e of what it was, where &amp;quot;e&amp;quot; is the natural exponent&lt;br /&gt;
(approximately 2.718281828). In other words, it is the timescale for exponential decay toward full compliance to&lt;br /&gt;
the desired behavior. When you want the vehicle to be very responsive use a short timescale of one second or&lt;br /&gt;
less, and if you want to disable a behavior then set the timescale to a very large number like 300 (5 minutes) or&lt;br /&gt;
more. Note, for stability reasons, there is usually a limit to how small a timescale is allowed to be, and is usually&lt;br /&gt;
on the order of a tenth of a second. Setting a timescale to zero is safe and is always equivalent to setting it to its&lt;br /&gt;
minimum. Any feature with a timescale can be effectively disabled by setting the timescale so large that it would&lt;br /&gt;
take them all day to have any effect.&lt;br /&gt;
&lt;br /&gt;
==  Setting the Vehicle Type ==&lt;br /&gt;
&lt;br /&gt;
Before any vehicle parameters can be set the vehicle behavior must first be enabled. It is enabled by calling&lt;br /&gt;
[[llSetVehicleType]] with any &#039;&#039;&#039;VEHICLE_TYPE_*&#039;&#039;&#039;, except [[VEHICLE_TYPE_NONE]] which will disable the&lt;br /&gt;
vehicle. See the {{LSLGC|Vehicle|vehicle types}} constants section for currently available types. More types will be available soon.&lt;br /&gt;
&lt;br /&gt;
Setting the vehicle type is necessary for enabling the vehicle behavior and sets all of the parameters to its default&lt;br /&gt;
values. For each vehicle type listed we provide the corresponding equivalent code in long format. Is is important&lt;br /&gt;
to realize that the defaults are not the optimal settings for any of these vehicle types and that they will definitely&lt;br /&gt;
be changed in the future. Do not rely on these values to be constant until specified.&lt;br /&gt;
&lt;br /&gt;
Should you want to make a unique or experimental vehicle you will still have to enable the vehicle behavior with&lt;br /&gt;
one of the default types first, after which you will be able to change any of the parameters or flags within the&lt;br /&gt;
allowed ranges.&lt;br /&gt;
&lt;br /&gt;
Setting the vehicle type does not automatically take controls or otherwise move the object. However should you&lt;br /&gt;
enable the vehicle behavior while the object is free to move and parked on a hill then it may start to slide away.&lt;br /&gt;
&lt;br /&gt;
We’re looking for new and better default vehicle types. If you think you’ve found a set of parameters that make a&lt;br /&gt;
better car, boat, or any other default type of vehicle then you may submit your proposed list of settings to&lt;br /&gt;
Andrew Linden via a script or notecard.&lt;br /&gt;
&lt;br /&gt;
==  Linear and Angular Deflection ==&lt;br /&gt;
&lt;br /&gt;
A common feature of real vehicles is their tendency to move along &amp;quot;preferred axes of motion&amp;quot;. That is, due to&lt;br /&gt;
their wheels, wings, shape, or method of propulsion they tend to push or redirect themselves along axes that are&lt;br /&gt;
static in the vehicle’s local frame. This general feature defines a class of vehicles and included in this category a&lt;br /&gt;
common dart is a &amp;quot;vehicle&amp;quot;: it has fins in the back such that if it were to tumble in the air it would eventually&lt;br /&gt;
align itself to move point-forward -- we’ll call this alignment effect angular deflection.&lt;br /&gt;
&lt;br /&gt;
A wheeled craft exhibits a different effect: when a skateboard is pushed in some direction it will tend to redirect&lt;br /&gt;
the resultant motion along that which it is free to roll -- we’ll call this effect linear deflection.&lt;br /&gt;
&lt;br /&gt;
So a typical Second Life vehicle is an object that exhibits linear and/or angular deflection along the &amp;quot;preferential&lt;br /&gt;
axes of motion&amp;quot;. The default preferential axes of motion are the local x- (at), y- (left), and z- (up) axes of the&lt;br /&gt;
local frame of the vehicle’s root primitive. The deflection behaviors relate to the x-axis (at): linear deflection will&lt;br /&gt;
tend to rotate its velocity until it points along it’s positive local x-axis while the angular deflection will tend to&lt;br /&gt;
reorient the vehicle such that it’s x-axis points in the direction that it is moving. The other axes are relevant to&lt;br /&gt;
vehicle behaviors that are described later, such as the vertical attractor which tries to keep a vehicle’s local z-axis&lt;br /&gt;
pointed toward the world z-axis (up). The vehicle axes can be rotated relative to the object’s actual local axes by&lt;br /&gt;
using the [[VEHICLE_REFERENCE_FRAME]] parameter, however that is an advanced feature and is covered in&lt;br /&gt;
detail in a later section of these documents.&lt;br /&gt;
&lt;br /&gt;
Depending on the vehicle it might be desirable to have lots of linear and/or angular delfection or not. The speed&lt;br /&gt;
of the deflections are controlled by setting the relevant parameters using the[[llSetVehicleFloatParam]] script call.&lt;br /&gt;
&lt;br /&gt;
Each variety of deflection has a &amp;quot;timescale&amp;quot; parameter that determines how quickly a full deflection happens.&lt;br /&gt;
&lt;br /&gt;
Basically the timescale it the time coefficient for exponential decay toward full deflection. So, a vehicle that&lt;br /&gt;
deflects quickly should have a small timescale. For instance, a typical dart might have a angular deflection&lt;br /&gt;
timescale of a couple of seconds but a linear deflection of several seconds; it will tend to reorient itself before it&lt;br /&gt;
changes direction. To set the deflection timescales of a dart you might use the lines below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetVehicleFloatParam(VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 2.0);&lt;br /&gt;
llSetVehicleFloatParam(VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 6.0);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each variety of deflection has an &amp;quot;efficiency&amp;quot; parameter that is a slider between 0.0 and 1.0. Unlike the other&lt;br /&gt;
efficiency parameter of other vehicle behaviors, the deflection efficiencies do not slide between &amp;quot;bouncy&amp;quot; and&lt;br /&gt;
&amp;quot;damped&amp;quot;, but instead slide from &amp;quot;no deflection whatsoever&amp;quot; (0.0) to &amp;quot;maximum deflection&amp;quot; (1.0). That is, they&lt;br /&gt;
behave much like the deflection timescales, however they are normalized to the range between 0.0 and 1.0.&lt;br /&gt;
&lt;br /&gt;
==  Moving the Vehicle ==&lt;br /&gt;
&lt;br /&gt;
Once enabled, a vehicle can be pushed and rotated by external forces and/or from script calls such as&lt;br /&gt;
[[llApplyImpulse]], however linear and angular motors have been built in to make motion easier and smoother.&lt;br /&gt;
Their directions can be set using the[[llSetVehicleVectorParam]] call. For example, to make the vehicle try to move&lt;br /&gt;
at 5 meters/second along its local x-axis (the default look-at direction) you would put the following line in your&lt;br /&gt;
script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, &amp;lt;5, 0, 0&amp;gt;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To prevent vehicles from moving too fast the magnitude of the linear motor is clamped to be no larger than about&lt;br /&gt;
30 meters/second. Note that this is clamped mostly because of limitations of the physics engine, and may be&lt;br /&gt;
raised later when possible.&lt;br /&gt;
&lt;br /&gt;
Setting the motor speed is not enough to enable all interesting vehicles. For example, some will want a car that&lt;br /&gt;
immediately gets up to the speed they want, while others will want a boat that slowly climbs up to its maximum&lt;br /&gt;
velocity. To control this effect you can use the [[VEHICLE_LINEAR_MOTOR_TIMESCALE]] parameter.&lt;br /&gt;
&lt;br /&gt;
Basically the &amp;quot;timescale&amp;quot; of a motor is the time constant for the vehicle to exponentially accelerate toward its full&lt;br /&gt;
speed.&lt;br /&gt;
&lt;br /&gt;
What would happen if you were to accidentally set the vehicle’s linear velocity to maximum possible speed and&lt;br /&gt;
then let go? It would run away and never stop, right? Not necessarily: an automatic &amp;quot;motor decay&amp;quot; has been built&lt;br /&gt;
in such that all motors will gradually decrease their effectiveness after being set.&lt;br /&gt;
&lt;br /&gt;
Each time the linear motor’s vector is set its &amp;quot;grip&amp;quot; immediately starts to decay exponentially with a timescale&lt;br /&gt;
determined by the [[VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE]], such that after enough time the&lt;br /&gt;
motor ceases to have any effect. This decay timescale serves two purposes. First, since it cannot be set longer&lt;br /&gt;
than 120 seconds, and is always enabled it gaurantees that a vehicle will not push itself about forever in the&lt;br /&gt;
absence of active control (from keyboard commands or some logic loop in the script). Second, it can be used to&lt;br /&gt;
push some vehicles around using a simple impulse model. That is, rather than setting the motor &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot;&lt;br /&gt;
depending on whether a particular key is pressed &amp;quot;down&amp;quot; or &amp;quot;up&amp;quot; the decay timescale can be set short and the&lt;br /&gt;
motor can be set &amp;quot;on&amp;quot; whenever the key transitions from &amp;quot;up&amp;quot; to &amp;quot;down&amp;quot; and allowed to automatically decay.&lt;br /&gt;
&lt;br /&gt;
Since the motor’s effectiveness is reset whenever the motor’s vector is set, then setting it to a vector of length&lt;br /&gt;
zero is different from allowing it to decay completely. The first case will cause the vehicle to try to reach zero&lt;br /&gt;
velocity, while the second will leave the motor impotent.&lt;br /&gt;
&lt;br /&gt;
The two motor timescales have very similar names, but have different effects, so try not to get them confused.&lt;br /&gt;
&lt;br /&gt;
::[[VEHICLE_LINEAR_MOTOR_TIMESCALE]] is the time for motor to &amp;quot;win&amp;quot;, and&lt;br /&gt;
&lt;br /&gt;
::[[VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE]] is the time for the motor’s &amp;quot;effectiveness&amp;quot; to decay&lt;br /&gt;
toward zero. If you set one when you think you are changing the other you will have frustrating results. Also, if&lt;br /&gt;
the motor’s decay timescale is shorter than the regular timescale, then the effective magnitude of the motor&lt;br /&gt;
vector will be diminished.&lt;br /&gt;
&lt;br /&gt;
==  Steering the Vehicle ==&lt;br /&gt;
&lt;br /&gt;
Much like the linear motor, there is also an angular motor that is always on, and whose direction and magnitude&lt;br /&gt;
can be set. For example, to make a vehicle turn at 5 degrees/sec around it’s local z-axis (its up-axis) you might&lt;br /&gt;
add the following lines to its script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vector angular_velocity = &amp;lt;0, 0, 5 * PI / 180&amp;gt;;&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DIRECTION, angular_velocity);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The magnitude of the angular motor is capped to be no more than two rotations per second (4*PI radians/sec).&lt;br /&gt;
&lt;br /&gt;
Also like the linear motor it has an efficiency parameter, [[VEHICLE_ANGULAR_MOTOR_TIMESCALE]], and a&lt;br /&gt;
motor decay parameter, [[VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE]], which is set to themaximum possible value of 120 seconds by default.&lt;br /&gt;
&lt;br /&gt;
When steering a vehicle you probably don’t want it to turn very far or for very long. One way to do it using the&lt;br /&gt;
angular motor would be to leave the decay timescale long, enable a significant amount of angular friction (to&lt;br /&gt;
quickly slow the vehicle down when the motor is turned off) then set the angular motor to a large vector on a key&lt;br /&gt;
press, and set it to zero when the key is released. Another way to do it is to set the&lt;br /&gt;
[[VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE]] to a short value and push the vehicle about with a&lt;br /&gt;
more impulsive method that sets the motor fast on a key press down (and optionally setting the motor to zero on&lt;br /&gt;
a key up) relying on the automatic exponential decay of the motor’s effectiveness rather than a constant angular&lt;br /&gt;
friction.&lt;br /&gt;
&lt;br /&gt;
Setting the angular motor to zero magnitude is different from allowing it to decay. When the motor completely&lt;br /&gt;
decays it no longer affects the motion of the vehicle, however setting it to zero will reset the &amp;quot;grip&amp;quot; of the vehicle&lt;br /&gt;
and will make the vehicle try to achieve zero angular velocity.&lt;br /&gt;
&lt;br /&gt;
For some vehicles it will be possible to use the &amp;quot;banking feature&amp;quot; to turn. &amp;quot;Banking&amp;quot; is what airplanes and&lt;br /&gt;
motorcycles do when they turn. When a banking vehicle twists about its roll-axis there is a resultant spin around&lt;br /&gt;
its yaw-axis. Banking is only available when using the &amp;quot;vertical attractor&amp;quot; which is described below.&lt;br /&gt;
&lt;br /&gt;
==  The Vertical Attractor ==&lt;br /&gt;
&lt;br /&gt;
Some vehicles, like boats, should always keep their up-side up. This can be done by enabling the &amp;quot;vertical&lt;br /&gt;
attractor&amp;quot; behavior that springs the vehicle’s local z-axis to the world z-axis (a.k.a. &amp;quot;up&amp;quot;). To take advantage of&lt;br /&gt;
this feature you would set the [[VEHICLE_VERTICAL_ATTRACTION_TIMESCALE]] to control the period of&lt;br /&gt;
the spring frequency, and then set the [[VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY]] to control the&lt;br /&gt;
damping. An efficiency of 0.0 will cause the spring to wobble around its equilibrium, while an efficiency of 1.0&lt;br /&gt;
will cause the spring to reach it’s equilibrium with exponential decay.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 4.0);&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 0.5);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The vertical attractor is disabled by setting its timescale to anything larger than 300 seconds.&lt;br /&gt;
&lt;br /&gt;
Note that by default the vertical attractor will prevent the vehicle from diving and climbing. So, if you wanted to&lt;br /&gt;
make a airplane you would probably want to unlock the attractor around the pitch axis by setting the&lt;br /&gt;
[[VEHICLE_FLAG_LIMIT_ROLL_ONLY]] bit:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetVehicleFlags(VEHICLE_FLAG_LIMIT_ROLL_ONLY);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Banking ==&lt;br /&gt;
&lt;br /&gt;
The vertical attractor feature must be enabled in order for the banking behavior to function. The way banking&lt;br /&gt;
works is this: a rotation around the vehicle’s roll-axis will produce a angular velocity around the yaw-axis,&lt;br /&gt;
causing the vehicle to turn. The magnitude of the yaw effect will be proportional to the&lt;br /&gt;
&lt;br /&gt;
::[[VEHICLE_BANKING_COEF]], the angle of the roll rotation, and sometimes the vehicle’s velocity along it’s&lt;br /&gt;
preferred axis of motion.&lt;br /&gt;
&lt;br /&gt;
::The [[VEHICLE_BANKING_COEF]] can vary between -1 and +1. When it’s positive then any positive rotation (by&lt;br /&gt;
the right-hand rule) about the roll-axis will effect a (negative) torque around the yaw-axis, making it turn to the&lt;br /&gt;
right -- that is the vehicle will lean into the turn, which is how real airplanes and motorcycle’s work. Negating&lt;br /&gt;
the banking coefficient will make it so that the vehicle leans to the outside of the turn (not very &amp;quot;physical&amp;quot; but&lt;br /&gt;
might allow interesting vehicles so why not?).&lt;br /&gt;
&lt;br /&gt;
::The [[VEHICLE_BANKING_MIX]] is a fake (i.e. non-physical) parameter that is useful for making banking&lt;br /&gt;
vehicles do what you want rather than what the laws of physics allow. For example, consider a real motorcycle...&lt;br /&gt;
it must be moving forward in order for it to turn while banking, however video-game motorcycles are often&lt;br /&gt;
configured to turn in place when at a dead stop -- because they’re often easier to control that way using the&lt;br /&gt;
limited interface of the keyboard or game controller. The [[VEHICLE_BANKING_MIX]] enables combinations of&lt;br /&gt;
both realistic and non-realistic banking by fuctioning as a slider between a banking that is correspondingly&lt;br /&gt;
totally static (0.0) and totally dynamic (1.0). By &amp;quot;static&amp;quot; we mean that the banking effect depends only on the&lt;br /&gt;
vehicle’s rotation about it’s roll-axis compared to &amp;quot;dynamic&amp;quot; where the banking is also proportional to it’s&lt;br /&gt;
velocity along it’s roll-axis. Finding the best value of the &amp;quot;mixture&amp;quot; will probably require trial and error.&lt;br /&gt;
&lt;br /&gt;
The time it takes for the banking behavior to defeat a pre-existing angular velocity about the world z-axis is&lt;br /&gt;
determined by the [[VEHICLE_BANKING_TIMESCALE]]. So if you want the vehicle to bank quickly then give it&lt;br /&gt;
a banking timescale of about a second or less, otherwise you can make a sluggish vehicle by giving it a timescale&lt;br /&gt;
of several seconds.&lt;br /&gt;
&lt;br /&gt;
==  Friction Timescales ==&lt;br /&gt;
&lt;br /&gt;
[[VEHICLE_LINEAR_FRICTION_TIMESCALE]] is a vector parameter that defines the timescales for the vehicle&lt;br /&gt;
to come to a complete stop along the three local axes of the vehicle’s reference frame. The timescale along each&lt;br /&gt;
axis is independent of the others. For example, a sliding ground car would probably have very little friction along&lt;br /&gt;
its x- and z-axes (so it can easily slide forward and fall down) while there would usually significant friction along&lt;br /&gt;
its y-axis:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, &amp;lt;1000, 1000, 3&amp;gt;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Remember that a longer timescale corresponds to a weaker friction, hence to effectively disable all linear friction&lt;br /&gt;
you would set all of the timescales to large values.&lt;br /&gt;
&lt;br /&gt;
Setting the linear friction as a scalar is allowed, and has the effect of setting all of the timescales to the same&lt;br /&gt;
value. Both code snippets below are equivalent, and both make friction negligible:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// set all linear friction timescales to 1000&lt;br /&gt;
llSetVehicleVectorParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, &amp;lt;1000, 1000, 1000&amp;gt;);&lt;br /&gt;
// same as above, but fewer characters&lt;br /&gt;
llSetVehicleFloatParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, 1000);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
/[[VEHICLE_ANGULAR_FRICTION_TIMESCALE]] is also a vector parameter that defines the timescales for the&lt;br /&gt;
vehicle to stop rotating about the x-, y-, and z-axes, and are set and disabled in the same way as the linear friction.&lt;br /&gt;
&lt;br /&gt;
==  Buoyancy ==&lt;br /&gt;
&lt;br /&gt;
The vehicle has a built-in buoyancy feature that is independent of the[[llSetBuoyancy]] call. It is recommended that&lt;br /&gt;
the two buoyancies do not mix! To make a vehicle buoyant, set the [[VEHICLE_BUOYANCY]] parameter to&lt;br /&gt;
something between 0.0 (no buoyancy whatsoever) to 1.0 (full anti-gravity).&lt;br /&gt;
&lt;br /&gt;
The buoyancy behavior is independent of hover, however in order for hover to work without a large offset of the&lt;br /&gt;
[[VEHICLE_HOVER_HEIGHT]], the [[VEHICLE_BUOYANCY]] should be set to 1.0.&lt;br /&gt;
&lt;br /&gt;
It is not recommended that you mix vehicle buoyancy with the[[llSetBuoyancy]] script call. It would probably&lt;br /&gt;
cause the object to fly up into space.&lt;br /&gt;
&lt;br /&gt;
==  Hover ==&lt;br /&gt;
&lt;br /&gt;
The hover behavior is enabled by setting the [[VEHICLE_HOVER_TIMESCALE]] to a value less than 300&lt;br /&gt;
seconds; larger timescales totally disable it. Most vehicles will work best with short hover timescales of a few&lt;br /&gt;
seconds or less. The shorter the timescale, the faster the vehicle will slave to is target height. Note, that if the&lt;br /&gt;
values of [[VEHICLE_LINEAR_FRICTION_TIMESCALE]] may affect the speed of the hover.&lt;br /&gt;
&lt;br /&gt;
Hover is independent of buoyancy, however the [[VEHICLE_BUOYANCY]] should be set to 1.0, otherwise the&lt;br /&gt;
vehicle will not lift itself off of the ground until the [[VEHICLE_HOVER_HEIGHT]] is made large enough to&lt;br /&gt;
counter the acceleration of gravity, and the vehicle will never float all the way to its target height.&lt;br /&gt;
&lt;br /&gt;
The [[VEHICLE_HOVER_EFFICIENCY]] can be thought of as a slider between bouncy (0.0) and smoothed (1.0).&lt;br /&gt;
&lt;br /&gt;
When in the bouncy range the vehicle will tend to hover a little lower than its target height and the&lt;br /&gt;
[[VEHICLE_HOVER_TIMESCALE]] will be approximately the oscillation period of the bounce (the real period&lt;br /&gt;
will tend to be a little longer than the timescale).&lt;br /&gt;
&lt;br /&gt;
For performance reasons, until improvements are made to the Second Life physics engine the vehicles can only&lt;br /&gt;
hover over the terrain and water, so they will not be able to hover above objects made out of primitives, such as&lt;br /&gt;
bridges and houses. By default the hover behavior will float over terrain and water, however this can be changed&lt;br /&gt;
by setting some flags:&lt;br /&gt;
&lt;br /&gt;
If you wanted to make a boat you should set the [[VEHICLE_HOVER_WATER_ONLY]] flag, or if you wanted to&lt;br /&gt;
drive a hover tank under water you would use the [[VEHICLE_HOVER_TERRAIN_ONLY]] flag instead. Finally,&lt;br /&gt;
if you wanted to make a submarine or a balloon you would use the [[VEHICLE_HOVER_GLOBAL_HEIGHT]].&lt;br /&gt;
&lt;br /&gt;
Note that the flags are independent of each other and that setting two contradictory flags will have undefined&lt;br /&gt;
behavor. The flags are set using the script call[[llSetVehicleFlags()]].&lt;br /&gt;
&lt;br /&gt;
The [[VEHICLE_HOVER_HEIGHT]] determines how high the vehicle will hover over the terrain and/or water, or&lt;br /&gt;
the global height, and has a maximum value of 100 meters. Note that for hovering purposes the &amp;quot;center&amp;quot; of the&lt;br /&gt;
vehicle is its &amp;quot;center of mass&amp;quot; which is not always obvious to the untrained eye, and it changes when avatar’s sit&lt;br /&gt;
on the vehicle.&lt;br /&gt;
&lt;br /&gt;
==  Reference Frame ==&lt;br /&gt;
&lt;br /&gt;
The vehicle relies on the x- (at), y- (left), and z- (up) axes in order to figure out which way it preferres to move&lt;br /&gt;
and which end is up. By default these axes are identical to the local axes of the root primitive of the object,&lt;br /&gt;
however this means that the vehicle’s root primitive must, by default, be oriented to agree with the designed at,&lt;br /&gt;
left, and up axes of the vehicle. But, what if the vehicle object was already pre-built with the root primitive in&lt;br /&gt;
some non-trivial orientation relative to where the vehicle as a whole should move? This is where the&lt;br /&gt;
&lt;br /&gt;
[[VEHICLE_REFERENCE_FRAME]] parameter becomes useful; the vehicle’s axes can be arbitrarily reoriented&lt;br /&gt;
by setting this parameter.&lt;br /&gt;
&lt;br /&gt;
As an example, suppose you had built a rocket out of a big cylinder, a cone for the nose, and some stretched cut&lt;br /&gt;
boxes for the fins, then linked them all together with the cylinder as the root primitive. Ideally the rocket would&lt;br /&gt;
move nose-first, however the cylinder’s axis of symmetry is its local z-axis while the default &amp;quot;at-axis&amp;quot; of the&lt;br /&gt;
vehicle, the axis it will want to deflect to forward under angular deflection, is the local x-axis and points out from&lt;br /&gt;
the curved surface of the cylinder. The script code below will rotate the vehicle’s axes such that the local z-axis&lt;br /&gt;
becomes the &amp;quot;at-axis&amp;quot; and the local negative x-axis becomes the &amp;quot;up-axis&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// rotate the vehicle frame -PI/2 about the local y-axis (left-axis)&lt;br /&gt;
rotation rot =llEuler2Rot(0, PI/2, 0);&lt;br /&gt;
llSetVehicleRotationParam(VEHICLE_REFERENCE_FRAME, rot);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Another example of how the reference frame parameter could be used is to consider flying craft that uses the&lt;br /&gt;
vertical attractor for stability during flying but wants to use VTOL (vertical takeoff and landing). During flight&lt;br /&gt;
the craft’s dorsal axis should point up, but during landing its nose-axis should be up. To land the vehicle: while&lt;br /&gt;
the vertical attractor is in effect, rotate the existing [[VEHICLE_REFERENCE_FRAME]] by +PI/2 about the&lt;br /&gt;
left-axis, then the vehicle will pitch up such that it’s nose points toward the sky. The vehicle could be allowed to&lt;br /&gt;
fall to the landing pad under friction, or a decreasing hover effect.&lt;br /&gt;
&lt;br /&gt;
{{LSLGC|Vehicle}}&lt;/div&gt;</summary>
		<author><name>Ralph Doctorow</name></author>
	</entry>
</feed>