2

I want to be able to teleport to an entity but keep my original rotation?
I tried /tp @p @e[type=ArmorStand] ~ ~.
I have looked everywhere and tested even the most stupid lines of code, in hope I'd stumble upon a working one.
Any help would be appreciated :)

2 Answers 2

1

When teleporting a entity to another, you cannot change the rotation. (There is no way to achieve this in a single command)

/tp @p @e[type=ArmorStand]

However, if you make this command run right after/before the teleportation to the armor stand, you can achieve the same effect.

/tp @p ~ ~ ~ <x rotation> <y rotation>

(Teleports the person who uses this command nowhere, then changes his rotation, or vice versa.)
Clue: Try making the armor stand execute this command.^

^ Since you're using @p, it does not affect the armor stand.

5
  • the problem with that is that I want my original rotation that I had before the tp to the armor stand and if there was a way to change it back it would flicker, I want to simulate flying in survival mode and if I just do regular tping I fall whereas with armor stands you seem to stay relatively still. The problem is it changes you face the direction of the armor stand allowing for only armor stand to appear infront of you because you can't change your own rotation (where you look an armor stand is summoned). I noticed with "/tp player x y z ~ ~" it allows for original rotation but there
    – kyrozane
    Commented Dec 25, 2014 at 12:13
  • isn't one for "/tp player entity/player" that I know of...
    – kyrozane
    Commented Dec 25, 2014 at 12:14
  • It's either /tp [target] [destination] or /tp [target] [co-ordinates] (the other).. Never both mashed together. You can substitute a entity/player selector with a co-ordinate, but you can't mash them together.
    – aytimothy
    Commented Dec 25, 2014 at 13:18
  • I was just wondering if there was any other form of adding the xrot and yrot relative to the player, I figure there would be a way just it's beyond my capabilities, if I figure it out though I'll be sure to mention it here
    – kyrozane
    Commented Dec 25, 2014 at 14:02
  • There isn't a way to add the x/y-rotation into a "teleport to target" command. It's one or the other.
    – aytimothy
    Commented Dec 25, 2014 at 14:06
0

(for 1.13+)

What I have found is:

/execute at @e[type=pig] as @e[pig,limit=1,sort=nearest] run tp @s @p

Seems to teleport the entity while keeping the player's rotation. (teleports entity with the player's original rotation)

1
  • This answer is invalid. The author clearly asks to sustain the player's position when the player is teleported, but this answer is for when an entity is teleported to the player.
    – ahmettrPro
    Commented Jul 22, 2020 at 23:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.