physics_query_manage
Perform Godot physics queries: cast 2D/3D rays, check point and shape overlaps, and simulate shape motion to detect collisions and retrieve hit results.
Instructions
Direct 2D and 3D Physics Space State Raycasts, Point Overlaps, and Shape Queries.
Ops:
intersect_ray_3d(from_pos=[0.0, 0.0, 0.0], to_pos=[0.0, -10.0, 0.0], collision_mask=0xFFFFFFFF, collide_with_bodies=True, collide_with_areas=False) Cast a ray in 3D world space and return hit position, normal, and collider.
intersect_ray_2d(from_pos=[0.0, 0.0], to_pos=[0.0, 100.0], collision_mask=0xFFFFFFFF, collide_with_bodies=True, collide_with_areas=False) Cast a ray in 2D world space and return hit position, normal, and collider.
intersect_point_3d(position=[0.0, 0.0, 0.0], max_results=32, collision_mask=0xFFFFFFFF) Query 3D colliders overlapping a point in world space.
intersect_point_2d(position=[0.0, 0.0], max_results=32, collision_mask=0xFFFFFFFF) Query 2D colliders overlapping a point in world space.
intersect_shape_3d(shape_type="sphere", radius=1.0, max_results=32) Query 3D colliders overlapping a shape in world space.
cast_motion_3d(shape_type="sphere", radius=1.0, motion=[0.0, -1.0, 0.0]) Simulate shape motion to determine safe and unsafe collision fractions.
Canonical call shape: {"op": "<verb>", "params": {...}}. Flat op parameters are accepted as a compatibility alias when the client transmits them; op and session_id remain top-level.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| params | No | ||
| session_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||