The entity that gets turned. Works on players, mobs, armor stands and any other entity, but must match exactly one.
Set the rotation directly. ~ values are relative to whatever runs the command, not to the target: your rotation from chat, the command block's from a command block.
Yaw: 0 south, 90 west, 180 north, -90 east. Pitch: -90 straight up, 0 level, 90 straight down. ~ values are relative to whatever runs the command: with the default @s target in chat, ~180 turns you around. From a command block, ~ uses the block's rotation, not the target's.
Rotates the target on the spot without teleporting it. Needs permission level 2 (an operator, command block or function); works from 1.21.2 onward.
/rotate changes only the direction an entity looks, never its position. To move and turn an entity in one command, use /tp with a rotation or facing clause instead.
/rotate turns an entity to face a new direction without changing its position. Added to Java Edition in 1.21.2, it replaces the old trick of teleporting an entity in place just to change where it looks: you set yaw and pitch directly, aim at exact coordinates, or point one entity at another.
The command has three forms. The plain form takes a rotation: a yaw and a pitch in degrees, where each value can be absolute (90), relative (~ or ~45), or a mix of both. Relative ~ values and the coordinates of the facing forms resolve against whatever runs the command, not against the rotated target: your position and rotation when typed in chat, the command block's when run from a command block. facing takes an x y z position and computes the rotation that points the entity at it. facing entity takes a second entity and an optional anchor, eyes or feet, that picks which part of that entity to look at; when the anchor is omitted it defaults to feet.
Like most game-master commands, /rotate requires permission level 2: cheats enabled in singleplayer, operator status on a server, or a command block or datapack function. Both entity arguments must resolve to exactly one entity, which is why the generator above warns when an @a or @e selector is missing limit=1.
The syntax has not changed since the command was added in 1.21.2, so the same generated command works in every version from 1.21.2 to the current release.
Copy any of these as a starting point, or rebuild them in the generator above:
/rotate @s ~180 ~Run from chat, turns you around 180 degrees while keeping your up-down view angle. The ~ values use your own rotation because you are both executor and target./rotate @s 0 0Faces you due south, level with the horizon. Useful for lining up screenshots and builds./rotate @e[type=armor_stand,limit=1,sort=nearest] facing 100 64 -200Points the nearest armor stand at the block position 100 64 -200./rotate @s facing entity @e[type=villager,limit=1,sort=nearest] eyesMakes you look directly at the nearest villager's eyes./rotate Steve facing entity @p feetTurns the player Steve to look at the feet of the player nearest to where the command runs.Before 1.21.2, map makers rotated entities by teleporting them to their own position with a facing clause: /tp @s ~ ~ ~ facing 0 64 0. That still works, but /rotate is the cleaner tool for the job. It never touches the entity's position, so there is no risk of rubber-banding a moving entity, no fall-distance reset, and no chunk-edge teleport side effects; it only writes the new yaw and pitch.
The practical difference shows up in repeating command blocks. A head-tracking armor stand built with /tp resets its motion every tick because each teleport rewrites the position. The same effect with /rotate ... facing entity @p eyes leaves physics alone: the stand keeps falling, riding or being pushed normally while its head follows the player. Use /tp when you need to move and turn at once; use /rotate when only the direction should change.
One thing /rotate does not do is track. The rotation is computed once, at the moment the command runs. For a billboard mob, a shopkeeper that watches customers or a cutscene camera, run the command every tick from a repeating command block or a datapack tick function.
The /rotate command, added to Java Edition in 1.21.2, turns an entity to face a new direction without moving it. You can set the yaw and pitch directly (/rotate @s 90 0), point the entity at exact coordinates (/rotate @s facing 0 64 0), or make it look at another entity (/rotate @s facing entity @p eyes). Before 1.21.2 the only vanilla way to rotate something was teleporting it in place with /tp.
Use the facing entity form: /rotate @e[type=armor_stand,limit=1] facing entity @p eyes turns the nearest armor stand to look at the nearest player's eyes. The anchor at the end is optional and can be eyes or feet; leaving it out defaults to feet. The rotation is applied once when the command runs, so put it on a repeating command block if you want the entity to keep tracking the player.
Yaw is the horizontal rotation in degrees: 0 faces south, 90 west, 180 (or -180) north and -90 east. Pitch is the vertical angle: -90 looks straight up, 0 is level with the horizon and 90 looks straight down. Both accept ~ and ~N relative values, which resolve against the rotation of whatever runs the command, not the target's: typed in chat, /rotate @s ~180 ~ turns you around without changing your vertical angle because you are both executor and target. From a command block, ~ uses the command block's rotation instead.
Both entity arguments of /rotate are single-entity arguments. Player names, @p, @r and @s are always fine, but @a and @e can match more than one entity, so the command refuses to parse them unless you restrict the selector with limit=1, for example /rotate @e[type=zombie,limit=1,sort=nearest] facing entity @p.
Yes. /rotate snaps a player's camera to the new direction the same way it turns any other entity, which makes it useful for cutscenes, spawn orientation and minigame resets. The player regains mouse control immediately afterwards, so for a held camera angle you would re-run the command every tick from a repeating command block or function.
Java Edition 1.21.2, released in October 2024 as part of the Bundles of Bravery drop. The syntax has not changed since, so commands from this generator work in 1.21.2 and every later version. Bedrock Edition does not have /rotate; the closest Bedrock equivalent is teleporting in place with facing, like /tp @s ~ ~ ~ facing @p.
Need to move entities too? Or browse more Minecraft tools: