Mouse loc to worldspace with hitting terrain?

Hello,
I recently came up with this blueprint:



It has to spawn a “house” in this case just a block to test but it the result from the convert mouse location to world space only has a Z value of 0. So I added a line trace to detect the highest position on the terrain using the result from the convert (indicated part) but this is of course not the position where I clicked. If I look 90 degrees down it is accurate but slightest camera movement already offsets it with quite a bit.

Anyone has an idea on what I should change the red part into?
I ultimately want a grid system where I can click and interact with these individual tiles but just messing around with the mouse options until I figured out how to use grids.

You should try the node “Get Hit Result under Cursor”. That one already does the trace and simply outputs you a HitResult from a trace from your camera, through your mouse onto the world :wink:

Cheers

Oh lord, it’s really that simple? Christ! Haha thanks a bunch for letting me know about this awesome function mate!