Difference between revisions of "SL Cert - Basic LSL Rotations"

From Second Life Wiki
Jump to navigation Jump to search
Line 4: Line 4:
== Basic Requirements ==
== Basic Requirements ==
=== Basic definition of position ===
=== Basic definition of position ===
==== Absolute position ====
* Absolute position  
==== Relative position ====
* Relative position  


=== Basic definition of a rotation ===
=== Basic definition of a rotation ===
*** Euler
* Euler
*** Axis and angle
* Axis and angle
*** Quarternions
* Quarternions


=== Changing position and rotation via the edit window ===
=== Changing position and rotation via the edit window ===
Line 18: Line 18:


=== Reference Frames ===
=== Reference Frames ===
*** Global
* Global
*** Local
* Local


=== Basic commands to get position information  ===
=== Basic commands to get position information  ===
*** llGetPos
* llGetPos
*** llGetLocalPos
* llGetLocalPos
*** llGetRootPosition
* llGetRootPosition


=== Basic commands to get rotation information ===
=== Basic commands to get rotation information ===
*** llGetRot
* llGetRot
*** llGetLocalRot
* llGetLocalRot
*** llGetRootRotation
* llGetRootRotation


===Basic commands for changing position ===
===Basic commands for changing position ===
*** llSetPos
* llSetPos
*** llSetPrimitiveParams
* llSetPrimitiveParams
*** llSetPos within different reference frames.
* llSetPos within different reference frames.


=== Basic commands for changing rotation ===
=== Basic commands for changing rotation ===
*** llSetRot
* llSetRot
*** llSetLocalRot
* llSetLocalRot
*** llSetPrimitiveParams
* llSetPrimitiveParams
*** How the commands work in different reference frames.
* How the commands work in different reference frames.
*** Rotations
* Rotations
**** Multiplication and division of rotations
** Multiplication and division of rotations
**** Difference between left and right multiplication
** Difference between left and right multiplication


== Advanced Requirements ==
== Advanced Requirements ==


=== Rotations and position ===
=== Rotations and position ===
*** using llSetPrimitiveParams to move and rotate at the same time
* using llSetPrimitiveParams to move and rotate at the same time
*** Rotating and moving a prim to a specified orientation
* Rotating and moving a prim to a specified orientation
**** Absolute coordinates
** Absolute coordinates
**** Relative coordinates (in a link set)
** Relative coordinates (in a link set)


=== Smooth movements in absolute coordinates ===
=== Smooth movements in absolute coordinates ===
**** Rotate and movement around the edge of a prim
* Rotate and movement around the edge of a prim
**** Rotate and move around a fixed point
* Rotate and move around a fixed point
**** Rotate and move around a predefined axis
* Rotate and move around a predefined axis


=== Smooth movements in local coordinates ===
=== Smooth movements in local coordinates ===
**** Rotate and movement around the edge of a prim
* Rotate and movement around the edge of a prim
**** Rotate and move around a fixed point
* Rotate and move around a fixed point
**** Rotate and move around a predefined axis
* Rotate and move around a predefined axis


=== Transitions ====
=== Transitions ====
**** Smooth movements between two different orientations
* Smooth movements between two different orientations

Revision as of 14:40, 21 February 2009

This is an initial take on a set of guidelines for scripting position and rotations. It still needs a lot of work and a good deal of thought.


Basic Requirements

Basic definition of position

  • Absolute position
  • Relative position

Basic definition of a rotation

  • Euler
  • Axis and angle
  • Quarternions

Changing position and rotation via the edit window

Intermediate Requirements

Reference Frames

  • Global
  • Local

Basic commands to get position information

  • llGetPos
  • llGetLocalPos
  • llGetRootPosition

Basic commands to get rotation information

  • llGetRot
  • llGetLocalRot
  • llGetRootRotation

Basic commands for changing position

  • llSetPos
  • llSetPrimitiveParams
  • llSetPos within different reference frames.

Basic commands for changing rotation

  • llSetRot
  • llSetLocalRot
  • llSetPrimitiveParams
  • How the commands work in different reference frames.
  • Rotations
    • Multiplication and division of rotations
    • Difference between left and right multiplication

Advanced Requirements

Rotations and position

  • using llSetPrimitiveParams to move and rotate at the same time
  • Rotating and moving a prim to a specified orientation
    • Absolute coordinates
    • Relative coordinates (in a link set)

Smooth movements in absolute coordinates

  • Rotate and movement around the edge of a prim
  • Rotate and move around a fixed point
  • Rotate and move around a predefined axis

Smooth movements in local coordinates

  • Rotate and movement around the edge of a prim
  • Rotate and move around a fixed point
  • Rotate and move around a predefined axis

Transitions =

  • Smooth movements between two different orientations