godot-raycasting-queries
БесплатноЗапускает вложенные скриптыНе проверенExpert blueprint for physics queries using RayCast, ShapeCast, and DirectSpaceState. Covers hit detection, volume overlap, mouse picking, and high-performance…
от thedivergentai★ 1 019 звёзд на GitHubОб этом скилле
Available Scripts
MANDATORY for common paths — read before implementing (do not improvise query APIs from memory):
- direct_space_state_raycast.gd — high-frequency
intersect_raywithout RayCast nodes.- query_exclusion_optimization.gd — RID exclude lists so casters never self-hit.
- shapecast_ground_detection.gd — footing / volume casts when thin rays tunnel or miss.
Do NOT Load every script below for one task. Open only the row that matches the decision table.
direct_space_state_raycast.gd
Expert usage of PhysicsDirectSpaceState2D/3D for bypassing node-based overhead in high-frequency queries.
shapecast_ground_detection.gd
Reliable ground/footing detection using volume-based ShapeCast instead of thin rays.
multiple_hit_piercing_ray.gd
Implementing piercing projectiles that detect and return multiple hits in a single line.
field_of_view_scanner.gd
AI sensor logic using a fan of raycasts to detect targets within a FOV cone.
raycast_reflection_logic.gd
Calculating bounces for lasers or bullets using collision normal reflection.
point_in_shape_query.gd
Checking for overlapping physics bodies at a single point (Explosion epicenters).
rest_info_3d_stuck_fix.gd
Using get_rest_info to detect stuck objects and resolve overlaps immediately.
mouse_pick_3d_query.gd
Converting 2D screen coordinates to 3D world rays for point-and-click interaction.
water_buoyancy_surface_calc.gd
Finding water surface height for buoyancy systems using high-to-low raycasting.
query_exclusion_optimization.gd
Optimizing performance by excluding specific RIDs (Resource IDs) from intersection checks.
NEVER Do in Physics Queries
- NEVER access
direct_space_stateoutside of_physics_process()— The physics space can be locked or running on a separate thread; querying it in_process()is unsafe [1, 2]. - NEVER use ShapeCast when a thin RayCast is sufficient — Volume queries are significantly more expensive. Default to rays unless you need volumetric detection [3, 4].
- NEVER assume results return
CollisionObjectnodes — CSG shapes,GridMap, andTileMapLayerreturn themselves, not a generic physics body [5, 6]. - NEVER assume
RayCastnodes update instantly — They update once per physics frame. If you move a node and query it immediately, you MUST callforce_raycast_update()[3, 9]. - NEVER use complex visual meshes for physics queries — GPU-only data requires expensive thread locking to parse. Use simplified primitive collision shapes [10, 11].
- NEVER iterate results to find the first valid hit — Use
collision_maskandcollision_layerto filter queries at the server level for maximum performance. - NEVER forget to exclude the caster — A ray starting from the center of a character will hit the character itself. Use
query.exclude = [self.get_rid()][20]. - NEVER use rays for small, fast detection areas — Rays can "tunnel" through thin walls if the frame rate drops. Use
cast_motionor high-frequency stepping for bullets. - NEVER query 1000+ rays individually in GDScript — Batch your queries or use the
PhysicsServerdirectly in C++ if you reach extreme query counts. - NEVER ignore the
result.rid— RIDs are the fastest way to identify and exclude objects in subsequent queries, bypassing node-path lookups [20].
Query-Type Decision Table
Pick the cheapest API that answers the question. Always pair rays/shapes with RID exclude + masks (query_exclusion_optimization.gd).
| Need | Prefer | Cost | When | Script |
|---|---|---|---|---|
| Persistent sensor in the scene (ledge, aim assist debug) | RayCast2D/RayCast3D node |
Low–med | Few casts; OK waiting one physics frame (or force_raycast_update()) |
Scene node + NEVER rules |
| Hitscan / LOS / one-shot mid-frame ray | PhysicsDirectSpaceState*.intersect_ray |
Low | High frequency, no permanent node | MANDATORY direct_space_state_raycast.gd |
| Footing, thick walls, melee volume | ShapeCast* / intersect_shape |
Med–high | Thin ray tunnels or misses volume | MANDATORY shapecast_ground_detection.gd |
| Explosion / occupancy at a point | intersect_point |
Low–med | Epicenter overlap list | point_in_shape_query.gd |
| Stuck / penetration resolve | `get_re |
Установить godot-raycasting-queries в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл godot-raycasting-queries?
Expert blueprint for physics queries using RayCast, ShapeCast, and DirectSpaceState. Covers hit detection, volume overlap, mouse picking, and high-performance server-side intersection queries. Use when implementing projectiles, LOS, terrain grounding, or AI sensors. Keywords raycast, shapecast, direct_space_state, intersect_ray, intersect_shape, PhysicsRayQueryParameters, collision mask, mouse picking.
Как установить скилл godot-raycasting-queries?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл godot-raycasting-queries запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic