Difference between revisions of "LlAtan2/Compass QA"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 6: Line 6:
integer a = 0;
integer a = 0;
integer b = 72;
integer b = 72;
float c = TWO_PI / b;
float c = -TWO_PI / b;
float d = 360.0 / b;
float d = 360.0 / b;
while(a <= b)
while(a <= b)
{
{
vector target = (<0,1,0> * llEuler2Rot(<0, 0, -a * c>));
vector target = (<0,1,0> * llEuler2Rot(<0, 0, a * c>));
llOwnerSay(llDumpList2String([((integer)(a * d))] + compass(p + target), " "));
llOwnerSay(llDumpList2String([((integer)(a * d))] + compass(p + target), " "));
a++;
a++;

Revision as of 09:12, 4 June 2010

<lsl>default { state_entry() { vector p = llGetPos(); integer a = 0; integer b = 72; float c = -TWO_PI / b; float d = 360.0 / b; while(a <= b) { vector target = (<0,1,0> * llEuler2Rot(<0, 0, a * c>)); llOwnerSay(llDumpList2String([((integer)(a * d))] + compass(p + target), " ")); a++; } } } </lsl>