Started by
SnailsAttack
on
Topic category: User side tutorials
Out of all the ways I've tried to get entities to face the player, the best way seems to be to just execute the following command as the entity you want to face the player.
/tp @s ~ ~ ~ facing entity @p[distance=0..16]
It's the only method that doesn't produce jittering or neck-snapping head turns.
Here's a few modified examples:
Make current entity face the nearest creeper at a distance between 3 and 24 blocks (executed as entity)
/tp @s ~ ~ ~ facing entity @e[type=creeper,limit=1,distance=3..24]
Make all non-player entities at a distance between 6 and 12 blocks face the player (executed as nearest player)
/execute as @e[type=!minecraft:player] at @s run tp @s ~ ~ ~ facing entity @p[distance=6..12]
Amazing! Amazing! This is exactly what I have been looking for, thank you