LlAtan2/Compass QA

From Second Life Wiki
Revision as of 10:06, 4 June 2010 by Strife Onizuka (talk | contribs) (Created page with '<lsl>default { state_entry() { vector p = llGetPos(); float a = 0; integer b = 72; float c = TWO_PI / b; float d = 360.0 / b; while(a <= b) { vector target = (...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

<lsl>default { state_entry() { vector p = llGetPos(); float 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>