TransWikia.com

How do I teleport an entity to the player's height?

Arqade Asked on December 20, 2021

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?

One Answer

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

Answered by ExpertCoder14 on December 20, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP