My AI is not shooting properly!

[FONT=comic sans ms]My AI is shooting in the direction of my character ,but when I go on height it does not change the pitch of the projectile.

[FONT=comic sans ms]This is how my AI shoots .That guy with red traces or lines is the AI.

This is the AI controller that this AI uses.
Tell me What is the Wrong with this?

Hi, the reason why it’s not shooting up or down is because the Line Trace is using just the forward vector (plus rotation along XY plane) of the skeletal mesh, So it does not actually know where the player is.

Instead try adding a Find Look at Rotation node. This will get you the direction from your AI Muzzle Socket location to the player. Once you have the direction, the rest is similar to what you have already implemented.