physics_raycast_2d
Cast a 2D ray to detect the first object hit, returning its position and surface normal for collision queries.
Instructions
Cast a ray in 2D physics space and return the first hit entity, hit point, and normal.
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": {
"origin": "<origin>",
"direction": "<direction>",
"maxDistance": "<maxDistance>"
},
"name": "physics_raycast_2d"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| origin | Yes | ||
| direction | Yes | ||
| layerMask | No | ||
| maxDistance | Yes |