click-target

작성자: facebook

XR에서 대상 객체를 찾아 클릭합니다. UI 상호작용 테스트, 버튼 클릭, 또는 상호작용 가능한 요소가 올바르게 작동하는지 확인할 때 사용하세요.

npx skills add https://github.com/facebook/immersive-web-sdk --skill click-target

Click Target in XR

Find a target object in the scene and click it using a controller, then verify the click registered.

Arguments

$ARGUMENTS should be a description of the target to find (e.g., "the RESTART button", "the scoreboard", "the settings panel").

Workflow

1. Get Scene Hierarchy

Use mcp__iwsdk-dev-mcp__scene_get_runtime_hierarchy to find the target object's UUID.

  • Look for objects with entityIndex (these are ECS entities)
  • PanelUI elements typically have nested children for their content

2. Get Target Transform

Use mcp__iwsdk-dev-mcp__scene_get_object_transform with the target UUID.

  • Use positionRelativeToXROrigin for all positioning operations
  • Note the position for the next steps

3. Position Headset to Look at Target

Use mcp__iwsdk-dev-mcp__xr_look_at with device headset and the target position.

  • This orients the headset to face the target

4. Screenshot to Verify Target Visible

Use mcp__iwsdk-dev-mcp__browser_screenshot to verify:

  • Target is visible in the view
  • Target is not occluded by other objects
  • If not visible, use mcp__iwsdk-dev-mcp__xr_look_at with moveToDistance to get closer

5. Position Controller

Use mcp__iwsdk-dev-mcp__xr_get_transform to check controller position.

  • If controller is visible in screenshot and not occluding target, proceed
  • If controller is far away or not visible:
    1. Get headset position with mcp__iwsdk-dev-mcp__xr_get_transform
    2. Set controller to headset position with mcp__iwsdk-dev-mcp__xr_set_transform
    3. Micro-adjust: offset x by +0.25 (right) or -0.25 (left), y by -0.1, z by -0.3

6. Point Controller at Target

Use mcp__iwsdk-dev-mcp__xr_look_at with the controller device and target position.

  • For UI elements on panels, you may need to target a specific child element
  • If the target is a button on a panel, the button may be offset from the panel center

7. Click

Use mcp__iwsdk-dev-mcp__xr_select with the controller device.

8. Verify Click

Use mcp__iwsdk-dev-mcp__browser_get_console_logs with a pattern to check for expected log messages.

  • If no logs match, the click may have missed - adjust target position and retry
  • Common adjustments: change x or z by 0.05-0.1 to hit child elements

Tips

  • For PanelUI buttons, the button position is often offset from the panel center
  • Use mcp__iwsdk-dev-mcp__scene_get_object_transform on child elements to find exact button positions
  • Always verify with console logs rather than assuming from visuals
  • The ray visual in screenshots can be misleading - test with actual clicks
  • Either controller (left or right) can be used

Example

To click the RESTART button on the pong scoreboard:

  1. Find scoreboard entity (entityIndex 6 in the pong game)
  2. Scoreboard is at (0, -0.798, -1.25)
  3. Button is at approximately (0.05, -0.798, -1.109) - offset toward player
  4. Point controller at button position and click
  5. Verify "[BUTTON CLICKED]" appears in console logs

facebook의 다른 스킬

binary-size-analysis
facebook
git 커밋 범위에 걸쳐 hermesvm 공유 라이브러리의 커밋별 바이너리 크기 변화를 분석합니다. 커밋별 크기와 주요 증가 및 감소 요약 테이블이 포함된 마크다운 보고서를 생성합니다.
official
modify-jsi-features
facebook
JavaScript Interface (JSI) 레이어에 새로운 JSI 기능을 추가하기 위한 가이드입니다. 사용자가 새로운 메서드나 기능을 추가, 생성 또는 구현하도록 요청할 때 사용하세요.
official
non-interactive-git-rebase
facebook
최상위 커밋이 아닌 git 커밋을 재정렬, 분할, 삭제 또는 수정해야 하며 대화형 편집기 접근이 불가능할 때 사용합니다. 프로그래밍 방식의 리베이스를 다룹니다…
official
iwsdk-planner
facebook
IWSDK 프로젝트 계획 및 모범 사례 가이드. 새로운 IWSDK 기능을 계획하거나, 시스템/컴포넌트를 설계하거나, IWSDK 코드 아키텍처를 검토할 때, 또는...
official
iwsdk-ui-panel
facebook
IWSDK UI 패널을 효율적으로 개발하고 반복 개선합니다. PanelUI 구성 요소 작업, UI 레이아웃 디버깅, 또는 IWSDK 애플리케이션의 UI 디자인 개선 시 사용하세요.
official
test-all
facebook
병렬 테스트 오케스트레이터. Task 하위 에이전트와 iwsdk CLI를 통해 9개의 모든 테스트 스위트를 동시에 실행합니다. 빌드, 예제 설정, 개발 서버, 에이전트 실행 등을 처리합니다.
official
test-audio
facebook
iwsdk CLI를 사용하여 오디오 예제에 대해 오디오 시스템(AudioSource 로딩, 재생 상태, 정지, 공간 오디오)을 테스트합니다.
official
test-ecs-core
facebook
ECS 핵심 기능(시스템 등록, 컴포넌트, Transform 동기화, 일시정지/단계/재개, 시스템 전환, 엔티티 발견, 스냅샷)을 poke…에 대해 테스트합니다.
official