Raycast radius
origins:raycast · entity action · entity condition · new field
TMA adds a radius field to Origins' own raycast action and condition. It makes the ray thick: an entity is hit when its hitbox comes within radius blocks of the ray. Use it for wide beams, or to make small or fast targets easier to hit.
| Field | Type | Default | Description |
|---|---|---|---|
radius | Double | 0 | How far from the ray an entity can be and still be hit, in blocks. 0 is Origins' normal thin ray. |
- Every other raycast field works as before. Packs that don't use
radiusbehave exactly as without TMA. - Blocks still stop the ray. When a block is nearer than the entity hit, the block is hit, as normal.
- With several entities near the ray, the one whose hit is nearest the start of the ray is picked.
- The hit position, used by
command_at_hitand the like, is where the ray enters the widened hitbox. - A pack that uses
radiusstill loads without TMA. The ray is just thin.
Example: "Beam". Pressing your primary key hits the first entity within 1.5 blocks of your line of sight, up to 24 blocks away.
{
"type": "origins:active_self",
"entity_action": {
"type": "origins:raycast",
"distance": 24,
"radius": 1.5,
"block": true,
"entity": true,
"bientity_action": {
"type": "origins:damage",
"amount": 4,
"damage_type": "minecraft:magic"
}
},
"cooldown": 40,
"key": {
"key": "key.origins.primary_active"
}
}