'execute unless entity @a[x_rotation=-180.0,y_rotation=0.9]' will always run even if entities rotation values are equal to the ones specified
I need the player always to be facing a certain direction but I can't use a repeating command block to teleport you to the same place every tick. I tried this command: execute unless entity @a[x_rotation=-179.0,y_rotation=0.9]
but even when your x and y rotation is -180.0 and 0.9 is still runs the command. Why is this?
Thanks, Dream
I figured it out. It turns out that that it should be: execute unless entity @a[x_rotation=0.9,y_rotation=-179.0]
since the x and y are flipped compared to the co-ords. It should also be something like: execute unless entity @a[x_rotation=-0.5..0.9,y_rotation=175.0..181.0]
so it targets players between certain values rather than specific ones. If you imagine something rotating on the y-axis it would be theoretically be spinning left to right or right to left and on the x-axis it would be spinning up and down.