--- name: iwsdk-ray description: Ray-based interactions in the WebXR scene — click objects, press UI buttons, or distance-grab with DistanceGrabbable. Use when the user wants to point at and interact with something at a distance, click a UI button, or test ray-based selection. argument-hint: [action] --- # Ray Interaction Point at and interact with objects or UI elements in the XR scene using the controller ray. The workflow has a **required core** (steps 1-4) and **optional extensions** that depend on whether the target is an object or UI element, and what kind of interaction is needed. User request is in `$ARGUMENTS`. ## Required Core These steps always execute in order. ### Step 1: Enter XR Check session status. If not in an active XR session, accept and enter. ``` xr_get_session_status → if not sessionActive → xr_accept_session ``` ### Step 2: Locate the target **For scene objects:** Find by name using `scene_get_hierarchy`, then get the UUID. ``` scene_get_hierarchy → find node matching target name ``` **For UI elements:** UI buttons/elements are children of PanelUI entities and may not have names by default. To locate precisely: 1. Read the UIKITML source file to find the element's `id` (e.g., `