How to send an object in a certain direction with Add Impulse?

I have a drawn direction on the screen based on the timing of my swing(baseball game) and I am having a hard time with sending it in this direction using “Add Impulse”. All I need is for the ball to go in the direction of the linetrace.

I get this line trace by taking the forward vector and adding a y-value to it based on the timing of the swing and the line trace works fine, again the seemingly impossible thing to me is getting the ball to go in that direction and this is without even putting any force on the z axis yet.

Any help would be greatly appreciated!!

the line trace works fine

If so, then:

If not, then the line trace is not so fine :wink:


You can do it before the trace, too. All you need is a unit direction and multiply by some force.