Hey,
I have a project with a square grid that actors can be placed on, and when I place an actor in the world while using the editor I’d like it to snap to the nearest grid position to the mouse cursor, allowing me to place the actors accurately and also cache the index of the grid node for later use. Unfortunately the ‘Get Hit Result Under Cursor by Channel’ function requires a player controller and of course there isn’t one available when just using the editor, so I can’t call it. There is a more generic line trace function but I can’t find any way to get the mouse position without a player controller.
Is there a way to either get the mouse position during construction or get a player controller during controller, or alternatively another place I can put this functionality that’s more suitable?
Thanks.