What command can testfor a player looking up?
//ads -- adsterra.com -- native banner
?>
What command can test for a player looking straight up?
Best Answer
The selector arguments rx (X rotation maximum) and rxm (X rotation minimum) will let you test for a player with a certain vertical rotation. In this case, as -90 is the furthest up you can look, the command you want should be:
/testfor @a[rxm=-90]
Pictures about "What command can testfor a player looking up?"



How do you detect what a player is looking at?
How to Enter the CommandHow do I use the Testfor player command?
detectPos is the x y z coordinate to detect the block. command is any Minecraft command that you want the entity to execute such as summon, give, fill, clone, setblock, tp, xp, kill, etc.How to detect a player using command blocks! | /execute command tutorial for 1.16 Minecraft Java
More answers regarding what command can testfor a player looking up?
Answer 2
Actually, that would detect anything below zero, for looking straight up you would use:
/testfor @a[rx=-90]
I would use
/testfor @a[rx=-50]
though
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Helena Lopes, cottonbro, Kampus Production, Joseph Redfield
