Difference between revisions of "LlTargetOmega test"

From Second Life Wiki
Jump to navigation Jump to search
m (Edited for style and readability)
 
Line 1: Line 1:
[[Category:Test Scripts]]
[[Category:Test Scripts]]
 
== Tests for [[llTargetOmega]] ==
=== Test 1 ===
<pre>
<pre>
Test 1:
1) Create two boxes near each other, one above the other.
1) Create two boxes near each other, one above the other.
2) Add the following "TargetOmega cycling" script to each box.
2) Add the following "TargetOmega cycling" script to each box.
Line 11: Line 11:
7) Click each of the boxes several times to cycle through rotating, rotating at increased speeds, and stopping.
7) Click each of the boxes several times to cycle through rotating, rotating at increased speeds, and stopping.
8) Drop the object on the ground while it's rotating and verify it continues to rotate.
8) Drop the object on the ground while it's rotating and verify it continues to rotate.
 
</pre>
<source lang="lsl2">
//// TargetOmega cycling
//// TargetOmega cycling
float rate = 0.0;
float rate = 0.0;
Line 25: Line 26:
}
}
////
////
</pre>
</source>


=== Test 2 ===
<pre>
<pre>
Test 2:
1) Create 2 boxes
1) Create 2 boxes
2) Add the following Rotate Script to one box
2) Add the following Rotate Script to one box
</pre>
<source lang="lsl2">
//// Rotate Script
//// Rotate Script
default {
default {
Line 36: Line 39:
}
}
////
////
</source>
<pre>
3) Make both boxes physical.
3) Make both boxes physical.
4) Link the rotating box as a child to the other box.
4) Link the rotating box as a child to the other box.
Line 43: Line 48:
</pre>
</pre>


Other tests to add:
=== Other tests to add ===


Rotating around an axis of <0,0,0>
* Rotating around an axis of <0,0,0>


Physical llTargetOmega prims and objects.
* Physical llTargetOmega prims and objects.

Latest revision as of 11:07, 27 October 2015

Tests for llTargetOmega

Test 1

1) Create two boxes near each other, one above the other.
2) Add the following "TargetOmega cycling" script to each box.
3) Link the boxes together.
4) Click each of the boxes several times to cycle through rotating, rotating at increased speeds, and stopping.
5) Attach the object while it's rotating and verify it continues to rotate.
6) Detach to inventory, then attach it again, and verify it rotates at the same speed.
7) Click each of the boxes several times to cycle through rotating, rotating at increased speeds, and stopping.
8) Drop the object on the ground while it's rotating and verify it continues to rotate.
//// TargetOmega cycling
float rate = 0.0;
default
 {
    touch_start(integer total_number)
    {
        rate += 2.5;
        if (rate > 10.0) rate = 0.0;
        llOwnerSay("rate = " + (string) rate);
        llTargetOmega(<0,0,1>, rate, 0.1);
    }
}
////

Test 2

1) Create 2 boxes
2) Add the following Rotate Script to one box
//// Rotate Script
default {
state_entry() { llTargetOmega(<0,0,1>, 1, 1); }
}
////
3) Make both boxes physical.
4) Link the rotating box as a child to the other box.
5) Verify the scripted box no longer rotates.
6) Toggle the linked set non-physical, then physical again.
7) Verify the scripted box is once again rotating, and that the linked set can be pushed around.

Other tests to add

  • Rotating around an axis of <0,0,0>
  • Physical llTargetOmega prims and objects.