Snap/Move selected actor to mouse location

Our designers are requesting the ability to move a selected actor to a specific spot on screen in the level viewport, similar to if they were using the placement tool or snapping behavior. They mentioned a similar shortcut existed in the UE3/4 days and was bound to M, but I’m not sure if that was an internal modification or a wide level editor feature.

Move Object to Camera is close, but doesn’t quire do what they want, and it also brings in the camera’s rotation which is not desired.

The Paste Here bindable shortcut is also close, but does require an extra click, and will duplicate things instead of moving.

Is there a feature like this already in the editor under a different name? Snap to Here or Snap to Mouse would be what I’d expect it to be called.

CryEngine has a similar feature bound to Ctrl+Shift+Click called Move to Surface (or Ctrl+Alt+Shift+Click) for Move and Align to Surface

If there isn’t an existing feature for this, where would be the best place to extend to provide a new shortcut?

Thanks for any info you can provide!

Hi James, this does not exist, but we do have an existing request for this in our internal feature requests (along with a paste to mouse cursor location). Unfortunately, I don’t have any timelines to share on when it would be implemented.

There is a terrain snapping feature (should be on “end” key), and a snap to actor (unbound by default), but those will also not quite fit your needs as described.

The paste would not necessarily need to be a duplicate action - you could cut / paste to get a similar result, with the drawback that it is an extra user action. However, it could be easier to stitch those together in a custom command if you wanted to self service a solution.

You may want to look into the selection set that is exposed on the mode manager. This will allow your changes to also work with UE6 features that are coming, and instanced static mesh instances. This still won’t cover the spline handles at this time, as those go through the component visualizer system, and currently manage selection differently. Take a look at FComponentVisualizerManager::HandleInputDelta if you haven’t already found that yet :blush:

Thank you for the information. Cut/Paste doesn’t seem to be usable in these cases because it ends up breaking connections to other actors or systems.

I’m currently working on a solution that establishes a resident UEdMode that intercepts ILegacyEdModeViewportInterface::InputKey and if all the conditions are met, runs a GEditor->ApplyDeltaToActor/Component with the calculated deltas

It seems to be working so far, but only at the Actor/Component level, I’m digging in to seeing if there is a good solution for applying this generically to things like Volume/Spline handles as well