Look at
origins-powerful-powers:look_atentity action and bi-entity action
Turns an entity's eyes toward a point, with the same turning rules as set_rotation.
As an entity action, it looks at a position:
| Field | Type | Default | Description |
|---|---|---|---|
x, y, z | Double | required | The point to look at. |
relative_to | String | "world" | world: the numbers are world coordinates. self: they're an offset from the entity's feet, like ~ ~ ~. |
max_step | Float | none | As in set_rotation. |
min_step | Float | 0 | As in set_rotation. |
As a bi-entity action, the actor looks at the target:
| Field | Type | Default | Description |
|---|---|---|---|
anchor | String | "eyes" | Which part of the target to look at: eyes, feet or center (the middle of its hitbox). |
max_step | Float | none | As in set_rotation. |
min_step | Float | 0 | As in set_rotation. |
Example: "Stare down". Hitting a mob turns your view to its eyes.
{
"type": "origins:action_on_hit",
"bientity_action": {
"type": "origins-powerful-powers:look_at",
"anchor": "eyes"
},
"cooldown": 1
}Example (an action): everything within 8 blocks of you turns to look at you. Mobs turn back when their AI next moves them.
{
"type": "origins:area_of_effect",
"radius": 8,
"bientity_action": {
"type": "origins:invert",
"action": {
"type": "origins-powerful-powers:look_at"
}
}
}