flying things

can I make so that a ex: a ender pearl summons and flys at the direction that the player is looking at?
Continue to help post