3

I want to teleport an armor stand with this command:

execute as @p at @s run tp @e[type=minecraft:armor_stand] ^ ^ ^3

This works well when the player is looking straight. But when the player looks down or up the armor stand moves up and down with the player’s eyes. So how can I teleport it level to the player, no matter how far up/down they are looking?

1
  • 3
    I don't understand the question. What does the looking direction have to do with teleporting things to the height of a player? Is it maybe just this that you're looking for? gaming.stackexchange.com/a/368457/171580 Commented May 31, 2020 at 22:47

1 Answer 1

4

You will need to execute the command using the rotated subcommand to force the command to execute as if the player is not looking up and down. However, because you need to provide both a horizontal and a vertical rotation, you can use tilde ~ notation to choose not to override horizontal rotation.

/execute as @p at @s rotated ~0.0 0.0 run tp @e[type=armor_stand] ^ ^ ^3
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .