coordinate_transform
Convert scene coordinates to element-local space or element-local coordinates to scene space using a named element and to_local or to_global direction.
Instructions
Transform coordinates between local and global space relative to a named element. Use to_local to convert scene coords to element-local, to_global to convert element-local to scene coords.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | X coordinate | |
| y | Yes | Y coordinate | |
| screen | No | Screen name to scope element search (searches all if omitted) | |
| element | Yes | Element name (h2d.Object.name) | |
| direction | Yes | Transform direction: to_local (scene→element) or to_global (element→scene) |