Get Hit Results under Cursor in the Editor

I am working on some Editor Utilities and an important part of it requires me to do traces underneath the cursor. This is just so I can determine the closest point to a static surface underneath the cursor.
This is pretty easy to do in game, but I am struggling in the editor, since any useful nodes require a Player Controller, which I assume rules them out for Editor use since I can’t get access to a player controller in the editor.

Does anyone know a handy alternative to firing a trace under the cursor in the editor?

Thank you in advance!

1 Like

Hi there! Did you found the solution? Trying to do the same thing rn)

I’m confused as to what you mean by in the editor. Do you mean in the viewport in the editor or do you want a trace literally on the editor? (Like for example in the Outliner window)

Probably both. Within the pie window youd want to return whatever primitive is found.
Outside of the pie window you’d probably want to return the interface object - whatever it is.

Unfortunatley, even with C++ i was only able to get things to run in pie via hacking a bluetility script system. Basically almost all processes for getting data require pie to be running/simulating, unless they are a bluetility function.

Possible behaviour here would be to start pie with the bluetility function, wait for a mouse click, get the values, and stop pie.

Surely, theres other possibilities that don’t require hacking up the engine as much - but not much for getting realitime information of what is within pie transmitted over to a plugin…