Click target

From facebook/immersive-web-sdk · View interactive version

Click target is an AI agent skill from the GitHub repository facebook/immersive-web-sdk. Find and click a target object in XR. Use when testing UI interactions, clicking buttons, or verifying interactable elements work correctly.

How to use this skill

Skill file

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-runtime__scene_get_runtime_hierarchy to find the target object's UUID.

2. Get Target Transform

Use mcp__iwsdk-runtime__scene_get_object_transform with the target UUID.

3. Position Headset to Look at Target

Use mcp__iwsdk-runtime__xr_look_at with device headset and the target position.

4. Screenshot to Verify Target Visible

Use mcp__iwsdk-runtime__browser_screenshot to verify:

5. Position Controller

Use mcp__iwsdk-runtime__xr_get_transform to check controller position.

1. Get headset position with mcp__iwsdk-runtime__xr_get_transform

2. Set controller to headset position with mcp__iwsdk-runtime__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-runtime__xr_look_at with the controller device and target position.

7. Click

Use mcp__iwsdk-runtime__xr_select with the controller device.

8. Verify Click

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

Tips

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
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.