What problem does it solve? Choosing and correctly implementing the right physics query in Godot is error-prone: rays tunnel through thin walls, casters hit themselves, queries run outside the physics step, and developers pick expensive volume casts when a thin ray would do. This Skill provides decision tables, mandatory script patterns, and hard rules for reliable raycasts, shapecasts, and direct space state queries. ## Core Features & Use Cases - Query-Type Decision Table: Maps each need (hitscan, footing, explosions, picking, piercing) to the cheapest correct API, from RayCast nodes to intersect_ray, intersect_shape, intersect_point, and get_rest_info. - Mandatory Script Patterns: Ready-to-load GDScript recipes for direct space state raycasts, RID exclusion optimization, and ShapeCast ground detection, plus specialized scripts for FOV scanners, piercing projectiles, mouse picking, and buoyancy. - Safety Rules & Migration Notes: A NEVER-do list covering physics-step-only access, self-hit exclusion, and force_raycast_update timing, plus per-version Godot 4.x migration notes for query API changes. - Use Case: Implementing a hitscan weapon in a Godot 4 FPS: load the direct_space_state_raycast script, apply RID exclusion so the player never self-hits, and filter targets with collision masks instead of iterating results. ## Quick Start Ask the AI to implement a hitscan weapon raycast in Godot 4 using direct space state with proper self-exclusion and collision masks.