At target/ko: Difference between revisions
Jump to navigation
Jump to search
Created page with "{{LSL_Event/ko|event_id=16|event_delay|event=at_target |p1_type=integer|p1_name=tnum|p1_desc={{LSLG/ko|llTarget}} 반환되는 값 |p2_type=vector|p2_name=targetpos|p2_desc={{LSL…" |
No edit summary |
||
| Line 48: | Line 48: | ||
{{LSL DefineRow||{{LSLG/ko|llRotTarget}}|회전 목표를 등록합니다.}} | {{LSL DefineRow||{{LSLG/ko|llRotTarget}}|회전 목표를 등록합니다.}} | ||
{{LSL DefineRow||{{LSLG/ko|llRotTargetRemove}}|회전 목표를 등록 해제합니다.}} | {{LSL DefineRow||{{LSLG/ko|llRotTargetRemove}}|회전 목표를 등록 해제합니다.}} | ||
{{2011,07,07 PM 5:59 by.Dal Ghost(seoul city)}} | |||
|also_articles | |also_articles | ||
|also_footer | |also_footer | ||
Revision as of 01:59, 7 July 2011
샘플
<lsl> integer target_id; vector target_pos;
default {
state_entry()
{
target_pos = llGetPos() + <1.0, 0.0, 0.0>;
target_id = llTarget(target_pos, 0.5);
}
at_target(integer tnum, vector targetpos, vector ourpos)
{
if (tnum == target_id)
{
llOwnerSay("object is within range of target");
llOwnerSay("target position: " + (string)targetpos + ", object is now at: " + (string)ourpos);
llOwnerSay("this is " + (string)llVecDist(targetpos, ourpos) + " meters from the target");
llTargetRemove(target_id);
}
}
not_at_target()
{
llOwnerSay(
"not there yet - object is at " + (string)llGetPos() +
", which is " + (string)llVecDist(target_pos, llGetPos()) +
" meters from the target (" + (string)target_pos + ")"
);
}
} </lsl>
추천 정보
이벤트
| • | not_at_target | |||
| • | at_rot_target | |||
| • | not_at_rot_target |
함수
| • | llTarget | – | 위치 목표를 등록합니다. | |
| • | llTargetRemove | – | 위치 목표를 등록 해제합니다. | |
| • | llRotTarget | – | 회전 목표를 등록합니다. | |
| • | llRotTargetRemove | – | 회전 목표를 등록 해제합니다. |
이 글이 유용하지 않으세요? LSL Wiki의 관련항목이 도움을 줄 수 있을 지도 모릅니다.