add_raycast
Attach a RayCast2D or RayCast3D to a Godot node, specifying target position, collision mask, and hit detection settings.
Instructions
Add a RayCast2D/3D child whose target_position is in the raycast's local space (pixels in 2D, metres in 3D)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"node_path": "<node_path>"
},
"name": "add_raycast"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | RayCast | |
| enabled | No | ||
| target_x | No | ||
| target_y | No | ||
| target_z | No | ||
| dimension | No | 2d | |
| node_path | Yes | ||
| collision_mask | No | ||
| hit_from_inside | No | ||
| collide_with_areas | No | ||
| collide_with_bodies | No |