Rope Endpoint (Data Type)
Describes one end of a rope (how it is chosen at runtime) used by the from and to fields of the Attach Rope.
Describes one end of a rope (how it is chosen at runtime) used by the from and to fields of the apoli:attach_rope. An endpoint resolves to either an entity (the rope follows it) or a fixed world point (immovable, so the other end can’t get farther than the rope’s length - a tether/leash).
Fields
| Field | Type | Default | Description |
|---|---|---|---|
source | String | "self" | Where the endpoint comes from. One of: self (the acting entity), target (the bi-entity target — only resolves when the action runs in a bi-entity context), raycast (cast a ray from the actor’s eyes), position (a fixed point). |
distance | Float | 30.0 | For raycast: how far the ray reaches. |
entities | Boolean | false | For raycast: whether the ray can attach to an entity it hits. |
blocks | Boolean | true | For raycast: whether the ray can attach to a block it hits. When both entities and blocks are enabled the nearest hit wins. |
position | Array of 3 Float | optional | For position: the fixed [x, y, z] world point. |
Examples
{
"source":"self"
} The acting entity.
{
"source":"raycast",
"entities":true,
"blocks":false,
"distance":20
} Whatever entity the actor is looking at within 20 blocks.
{
"source":"position",
"position":[
100.5,
64,
200.5
]
} A fixed anchor in the world.