
Command
/rotate
Turns an entity to a given rotation or makes it face a position or another entity, without moving it.
| /rotate <target> facing entity <facingEntity> [<facingAnchor>] |
| /rotate <target> facing <facingLocation> |
| /rotate <target> <rotation> |
| Argument | Kind of value | What to type |
|---|---|---|
| <target> | Target selector | The single entity to turn. One entity only. |
| <facingEntity> | Target selector | For facing entity: the single entity to look at. One entity only. |
| <facingAnchor> | Entity anchor | For facing entity: eyes or feet, the part of the other entity to look at. Default feet. |
| <facingLocation> | Exact position | For facing: the coordinates to look at. |
| <rotation> | Rotation | Two angles in degrees: first the horizontal rotation (yaw), then the vertical rotation (pitch). Each can be written with ~ to make it relative. |
| Permission level | 2: operators, worlds with cheats on, command blocks and functions |
| Works in | Singleplayer with cheats enabled, operators on multiplayer servers, command blocks and functions. |
| Result | Reports "Rotated <entity>". The number /execute store saves is 1. |
| Two forms | Give a rotation as two numbers, or use facing with either coordinates or the word entity followed by an entity to look at. |
| Relative rotation | A ~ in the rotation is measured from the rotation the command runs with, which is your own rotation when you type it. /rotate @s ~90 ~ turns you 90 degrees. |
| Facing an entity | The target looks at the other entity's feet unless eyes is given. |
| One target | Only a single entity can be rotated per command. |
/rotate @s 90 0Turns you to yaw 90 with a level view.
/rotate @s ~180 ~Turns you around to face the opposite direction.
/rotate @s facing 0 64 0Makes you look at the coordinates 0 64 0.
/rotate @e[type=minecraft:armor_stand,limit=1,sort=nearest] facing entity @p eyesTurns the nearest Armor Stand to look at the nearest player's eyes.
/rotate @p facing entity @e[type=minecraft:villager,limit=1,sort=nearest]Makes the nearest player look at the feet of the nearest Villager.

