How to move 3D objects with the mouse?


I would like to use Blueprints to be able to move pieces of a puzzle with the mouse. Essentially clicking on a block, moving the block to a different place and drop it there.

I have been using the same method as the one in the example content (mouse interactions), using get hit results under cursor and updating the object location on event tick.

Functionally, it works, but there is a lot of performance lag. If I create a grid of 20 tiles on which to place my object, the object trails behind the cursor instead of sticking precisely to it when I move around. The faster I move around the more noticeable the lag.

Is there a better way to move a 3D actor than the method described ? Using blueprints only please.

Instead of using event tick, try using the timer by event node set on a loop at .001 seconds. Make sure to create a reference to the timer handle when you create it and invalidate that timer handle when you drop the puzzle piece.

Thanks for the suggestion, I will try that approach