OsGetSitTargetPos
From OpenSimulator
(Difference between revisions)
JeffKelley (Talk | contribs) (Created page with "{{osslfunc |threat_level=ignored |permissions=true |delay=0|function_syntax=vector osGetSitTargetPos()<br> |ossl_example=<source lang="lsl"> </source> |description= Return th...") |
JeffKelley (Talk | contribs) m |
||
Line 4: | Line 4: | ||
|delay=0|function_syntax=vector osGetSitTargetPos()<br> | |delay=0|function_syntax=vector osGetSitTargetPos()<br> | ||
|ossl_example=<source lang="lsl"> | |ossl_example=<source lang="lsl"> | ||
+ | // Unit test : Writing then reading SitTarget | ||
+ | default | ||
+ | { | ||
+ | state_entry() | ||
+ | { | ||
+ | vector write_pos = <1,2,3>; | ||
+ | vector write_rot = <4,5,6>; | ||
+ | |||
+ | llSitTarget (write_pos, llEuler2Rot(write_rot * DEG_TO_RAD)); | ||
+ | |||
+ | vector read_pos = osGetSitTargetPos(); | ||
+ | vector read_rot = llRot2Euler (osGetSitTargetRot()) * RAD_TO_DEG; | ||
+ | |||
+ | llOwnerSay (read_pos); | ||
+ | llOwnerSay (read_rot); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | [12:45] Object: <1.000000, 2.000000, 3.000000> | ||
+ | [12:45] Object: <4.000000, 5.000000, 6.000000> | ||
</source> | </source> | ||
|description= | |description= |
Revision as of 00:29, 1 March 2024
vector osGetSitTargetPos()
| |
Return the sit target location as set by llSitTarget. | |
Threat Level | This function does not do a threat level check |
Permissions | Use of this function is always allowed by default |
Extra Delay | 0 seconds |
Example(s) | |
// Unit test : Writing then reading SitTarget default { state_entry() { vector write_pos = <1,2,3>; vector write_rot = <4,5,6>; llSitTarget (write_pos, llEuler2Rot(write_rot * DEG_TO_RAD)); vector read_pos = osGetSitTargetPos(); vector read_rot = llRot2Euler (osGetSitTargetRot()) * RAD_TO_DEG; llOwnerSay (read_pos); llOwnerSay (read_rot); } } [12:45] Object: <1.000000, 2.000000, 3.000000> [12:45] Object: <4.000000, 5.000000, 6.000000> | |
Notes | |
This function was added in 0.9.3.0 |