How can I make a Player only look in one direction?

How can I make a Player only look in one direction? - Man Standing on Stair Case Looking Up

I am making a map for Minecraft and I want to make the Player only be able to face a certain wall.

Is there any way that I could do that?



Best Answer

You can achieve this with the /tp repeating. For example:

/tp @p ~ ~ ~ 90 0

The ~ ~ ~ means that their x, y and z won't be changed, but their yaw (left/right) will be set to 90 and their pitch (up/down) to 0.

You will need to put this command in a repeating command block or some other form of clock.




Pictures about "How can I make a Player only look in one direction?"

How can I make a Player only look in one direction? - 2 Men in Red and White Jersey Shirt Sitting on Grass Field
How can I make a Player only look in one direction? - Free stock photo of adult, adults only, alone
How can I make a Player only look in one direction? - Content female customer with long curly hair wearing casual outfit sitting at wooden table with netbook in classic interior restaurant while making online order



How do you test a player for a specific direction?

2. Type the Command
  • Test if Players are within 10 blocks. In this example, we will test to see if there are any players within a 10 block radius with the following command: /testfor @a[r=10] ...
  • Test if Mooshrooms are within 50 blocks. ...
  • Test if Nearest Player is at Level 20 experience.


  • How do you test a player in a certain area bedrock?

    Firstly, find your position on the map. Press F3 and jot down your X, Y & Z coordinates located on the left. Then type into the chat bar /tp [target player] <x> <y> <z> [<y-rot> <x-rot>] replacing <x> , <y> and <z> with your coordinates you wrote down. Then, change <y-rot> and <x-rot> with the angles you want.



    One Direction recording 'FOUR' the album #10YearsofOneDirection




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: Kaique Rocha, Yogendra Singh, Artem Podrez, Yan Krukov