1

I have been trying to find out if you can store the direction a player is facing and maybe use it to summon an arrow that shoots in that direction. I want to make a gun but it would take years and very many command blocks to make a system that will detect every single direction and then shoot the arrow in that direction. That's why I'm asking if there is any way to do it.

1 Answer 1

1

Assuming 1.13.

To store player's rotation, use execute store:

execute store result score rot0 store run data get entity @p Rotation[0] 1000000
execute store result score rot1 store run data get entity @p Rotation[1] 1000000

which stores his rotation in multidegree

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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