Minecraft – How to use tildes and carets in the teleport command?

minecraft-commandsminecraft-java-edition

I need help with using these symbols because the wiki isn't helping me. Also, when I use this ^ in a repeating command block, it doesn't update where I am looking at.[1] Could someone help me? [1]Especially this one.

Best Answer

The tilde ~ coordinate is relative to the player's current world location. So if I teleport a player to ~ ~1 ~, then they will be teleported 1 block up from their current position.

Using the carrot ^ will be relative to the current local direction of the player. So a ^X will be towards the left, while ^-X will be towards the right, while ^Z will be forward in front of the player and ^-Z will be behind. ^Y is up, ^-Y is down. So if a player is teleported ^ ^ ^1, then the player is teleported 1 block in the direction they are looking.