mojira.dev
MC-277909

Rescaled entity with the scale attribute can't face other entities eyes correctly

How to reproduce:

Stand somewhere on a flat ground and run these four commands sequentially:

summon wandering_trader ~2 ~ ~ {NoAI:1b,Tags:["e1"],attributes:[{id:"scale",base:0.5}]}
summon villager ~2 ~ ~1 {NoAI:1b,Tags:["e2"],attributes:[{id:"scale",base:0.5}]}
rotate @n[tag=e1] facing entity @s eyes
rotate @n[tag=e2] facing entity @n[tag=e1] eyes

The expected result would be the wandering trader looking at the player's eyes, and the villager looking at the wandering trader's eyes. But they look much too high. (See attached screenshot).

More context :

I honestly don't know how to describe this issue exactly, as from my testing, the eyes anchor is defined correctly on the new entity's eyes position while being re-scaled. For example running this would show the particle on the entity's eyes location as expected:

execute as @n[tag=e1] at @s anchored eyes positioned ^ ^ ^ run particle soul_fire_flame ~ ~ ~ 0 0 0 0 1

But re-scaled entities themselves don't manage to retrieve other entities eyes location normally, as they would act as if they were even smaller.

 

Attachments

Comments 2

Command context for the rotate commands is anchored at the feet, not the eyes; this is expected, and you'll see the same regardless of scale. (Note that if you draw a line from the feet to the eyes of the target, it is parallel to the eye line.)

execute as @n[tag=e2] anchored eyes run rotate @s facing entity @n[tag=e1] eyes

Oh crap, how did I miss that. Indeed, this can be marked as invalid.

KawaMood

(Unassigned)

Unconfirmed

(Unassigned)

1.21.3

Retrieved