Top Down Shooter aim at mouse glitches out

Hey guys.

I have a problem with aiming in my game. The problem is when the player holds down the aim button (which is right click on the mouse) it will trigger the aimdownsight and where ever the mouse is on the screen, it will look at it and shoot when pressed. However, if you noticed closely, it isn’t accurate and glitches/spazzes out when it overlaps with objects. Any idea how to fix it?

[Click me for the video, you can see what is wrong][2]

Blueprint for aiming where ever the cursor is on screen.

Hello !!

After watching the video and checking your blueprint I think that is intended behavior based on your code. If you are looking to stop the angular “snapping,” I have 2 ideas.

One solution (The mathematical method) would be to directly convert the mouse position to world position. Next you should change this value’s Z vector to zero, and normalize that and look toward the result.

My other idea (Involving invisible geometry) , if you really wanted to stick to this mouse line trace, would be to attach a large plane to the player’s feet and mask out anything else in the trace. This is a good idea because, theoretically, the angle of the view will not affect the trace effect because it’s parallel to the floor and will skew as the camera angles more toward the top of the screen.

Could you show me how?

What do you need help with?
What part?

I found a fix for this so far, I followed thislink text tutorial and it seem it has done the job!