physics_manage
Run 2D/3D raycasts, point queries, and create sensors or shapecasts to detect collisions in Godot physics spaces.
Instructions
Physics Queries, Raycasting, and Sensor Scaffolding.
Ops:
raycast_2d(from_pos=[0, 0], to_pos=[0, 100], collision_mask=4294967295, collide_with_bodies=True, collide_with_areas=False, hit_from_inside=False) Perform a 2D raycast query directly through the active World2D physics space, returning collision point, normal, collider path, and shape.
raycast_3d(from_pos=[0, 10, 0], to_pos=[0, -10, 0], collision_mask=4294967295, collide_with_bodies=True, collide_with_areas=False, hit_from_inside=False) Perform a 3D raycast query directly through the active World3D physics space, returning collision point, normal, collider path, and shape.
query_point_2d(point=[0, 0], collision_mask=4294967295, max_results=32, collide_with_bodies=True, collide_with_areas=False) Query intersecting physics bodies and areas overlapping a 2D world coordinate.
scaffold_sensor(parent_path="", target_position=[0, 50], is_2d=True, sensor_name="GroundSensor", collision_mask=1, enabled=True) Instantiate and attach a RayCast2D or RayCast3D sensor to a character or node.
query_point_3d(point=[0, 0, 0], collision_mask=4294967295, max_results=32, collide_with_bodies=True, collide_with_areas=False) Query intersecting physics bodies and areas overlapping a 3D world coordinate.
shapecast_scaffold(parent_path="", shape_type="sphere", radius=1.0, is_2d=False, sensor_name="ShapeCast", collision_mask=1) Create a ShapeCast2D or ShapeCast3D node with the specified collision shape.
set_layer_names(layer_type="2d_physics", layers={"1": "Environment", "2": "Player"}) Set project-wide layer names (layer_type: 2d_physics | 3d_physics | 2d_render | 3d_render).
get_layer_names(layer_type="all") Get configured layer names (layer_type: 2d_physics | 3d_physics | 2d_render | 3d_render | all).
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 | |||