I'm attempting to recreate this concept using an 16 'x' compass rose and 25 'y' axis degree. My first attempt I already had the rotations for N, S, E, and, W as well the NE, NW, SE, and SW. Additionally, I had the 'y' axis degrees looking down. But as I research more, I found the cardinal directions were not accurate.

In the wiki, it states that 180.0 is north, -90.0 is east, 0.0 is south, and 90.0 is west. With that being said the appropriate command for testing facing south is @a[ry=0,rym=-0]. However once a player turning left meeting 0.0 the command automatically finds the player once they reached 0.9 instead of 0.0.

The same issue is the same if a player was to look up. An example is when a player were to attempt to face at 75 degree up the command to testfor such thing would be /testfor @a[rxm=-75,rx=-75].

What do I need to know in order to testfor the correct and accurate intgers? Am I doing something wrong on how the order of ry & rx in each command?

  • I'm pretty sure you can't test for the exact values in the selectors, as @a[rxm=-75.0,rx=-75.0] won't work. and the way it's found is just the way minecraft rounds those numbers, i don't think there is anything we can do about that.
    – Plagiatus
    Dec 26 '16 at 19:07

You can easily find the rotations by pressing F3 in a world and looking at where it says "Facing:". This picture shows the rotation my head is currently looking at.Rotation

  • 2
    The question is asking about using the rotation values in commands, which your answer doesn't address.
    – Angzuril
    Jan 5 '17 at 21:09
  • This actually is the rotation values, because you can type /tp @p ~ ~ ~ -27 -7 and it will teleport you to that exact rotation. So unless I'm misunderstanding you, I believe this is correct.
    – Jason
    Jan 5 '17 at 21:13
  • 1
    I should have said command blocks. Yes they can input values from F3, but they need a way to find the find the values using the command block, e.g. check if a player is facing southeast.
    – Angzuril
    Jan 5 '17 at 21:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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