Get hit result under cursor problem

I loaded up fps layout and I’m trying to spawn an actor using get hit result under cursor, the problem is that it don’t spawn centered in the screen, the cursor doesn’t follow the center of the screen, even if the crosshair does. So how do I spawn that actor aiming for the center of the screen instead of using the cursor?

You use tracing:

Either line trace for object or by channel.

What should I put in the “End” vector?

I just scrubbed through the video I linked and it does not, indeed, cover it. My bad.

You would need to get forward vector of the camera, multiply it by distance and add it the start vector.

Something like that should work:

edit: in your case you probably do not want to use it during tick unless you want to spawn one object per frame, that is :wink:

I will try it out. Thank you very much.