Steps to Reproduce:
Download the world and import it
Turn on switch above command block
Stand on purple concrete and throw a snowball in the direction of light blue concrete
Expected Results:
The snowball should moves in the direction the player is looking
Observed Results:
The snowball moves in the positive Z direction
Affected Projectiles:
Snowball
Egg
Arrow
Video:
https://drive.google.com/file/d/1vMgn6-9MGqWWsotEfw1z7RyHKC6cAENR/view?usp=sharing
Part of this issue is that when the command block is set to repeat on every tick, the command always runs as soon as the snowball spawns and before it can set its own rotation and direction of movement. Since mobs initially spawn facing south (+Z), the command causes the snowballs to move south.
Another part of the explanation for what happens here is that the command used in the command block does not tell the snowballs to teleport in the direction the player is facing. The command teleports snowballs in the direction the snowballs themselves are facing. This might be what you would intuitively want so that the trajectory does not change after launch if the player turns or moves, but then that assumes projectiles always face the direction that they travel. I don’t think that they do, based on testing some alternative commands.