tile-picking-interaction
/tile-picking-interaction
Use when converting a mouse/touch position into the correct isometric tile for selection, highlighting, and placement.
- Author
- 0xheycat ↗
- Repository
- isometric-game-skills ↗
- Licence
- MIT
- Last repository change
- 12.08.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 12.08.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when converting a mouse/touch position into the correct isometric tile for selection, highlighting, and placement.
Original author description
Use when converting a mouse/touch position into the correct isometric tile for selection, highlighting, and placement.
How it works
- Overview
- When to Use
- Process
- Rationalizations (Stop Lying to Yourself)
- Red Flags - STOP if you catch yourself:
- Verification
SKILL.md preview
--- name: tile-picking-interaction description: Use when converting a mouse/touch position into the correct isometric tile for selection, highlighting, and placement. license: MIT --- # Tile Picking & Interaction ## Overview Picking is screen->grid with the camera inverse applied first. This skill turns a pointer position into the exact tile under it, with a highlight and hit-test that respects camera pan/zoom. ## When to Use - Clicking selects the wrong tile. - You need hover highlight or click-to-place. - Picking ignores camera pan/zoom. ## Process 1. Take the pointer position in screen space. 2. Apply the inverse camera transform (see `camera-pan-zoom-controls`). 3. Apply screen->grid from `isometric-grid-math` and round to a tile. 4. Clamp the result to map bounds and check walkable if needed. 5. Draw a highlight on the picked tile for feedback. 6. On click, dispatch the tile coord to the gameplay handler. 7. Test picking at multiple zoom levels and pan offsets. ```js const world = screenToWorld(pointer, cam); const tile = worldToGrid(world, W, H); // then round ``` ## Rationalizations (Stop Lying to Yourself) | Excuse | Reality | |---|---| | "I will skip the camera inverse" | Then picking breaks the moment you pan/zoom. Always invert. | | "No need to highlight" | Players need feedback on what they will click. Highlight. | ## Red Flags - STOP if you catch yourself: - Picking that ignores camera pan/zoom. - No rounding so edge tiles mis-select. - No visual highlight feedback. ## Verification You are NOT done until every box is checked: - [ ] Picked tile is correct at any pan and zoom. - [ ] Hover highlight matches the actual selected tile. - [ ] Clicks dispatch the right grid coordinate.
Versions
The database has no other skills named tile-picking-interaction.
Database snapshot: 13.11.2026 · package version 79fcf4101940 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 95threejs-interaction
Three.js interaction - raycasting, controls, mouse/touch input, object selection. Use when handling user input, implementing click detection, adding camera controls, or creating interactive 3D experiences. - 95threejs-interaction
Three.js interaction - raycasting, controls, mouse/touch input, object selection. Use when handling user input, implementing click detection, adding camera controls, or creating interactive 3D experiences. - 100threejs-interaction
Three.js interaction - raycasting, controls, mouse/touch input, object selection. Use when handling user input, implementing click detection, adding camera controls, or creating interactive 3D experiences. - 95cesiumjs-interaction
CesiumJS interaction and picking - ScreenSpaceEventHandler, multi-key KeyboardEventModifier input actions, Scene.pick, Scene.drillPick, Scene.pickPosition, Scene.snap edge snapping (1.144), mouse and touch events. Use when handling user clicks on the globe, selecting entities or… - 100threejs-interaction
Implement and debug Three.js interaction with Raycaster, pointer and touch coordinate conversion, hover/selection state, camera controls, dragging, keyboard input, and world-to-screen projection. Use when picking objects, adding OrbitControls or PointerLockControls, handling… - 100input-system
Handle player input in Godot across keyboard, mouse, gamepad, and touch devices. Use this skill when configuring input actions, processing keyboard/mouse/gamepad events, implementing touch controls, setting up virtual joysticks, managing mouse modes, or building remappable input systems.