Dragging objects with mouse

Hi there,

I would like to make a “system” that would allow player to drag the objects around. Right now I managed to make it so that I can drag a cube but the problem is that when I click on it, it jumps from its current position right into the camera. I am aiming to make something like on this video: It is also important for me to make sure that the object is dragged exactly by the point where you click with the mouse cursor. Here is the screenshot of my blueprintee4bc9b112acd655b3934b487507fda9bee0bacd.jpeg

Any help appreciated :slight_smile:

An update - I am trying to cast to Player controller from FirstPersonCharacter BP to set the Trace distance. But can’t do it. I need to make the game calculate the distance from the camera to the object, depending on hit result of the line trace. Then I want this distance to be a float value for the Trace distance in the Player controller BP.
In other words I want the character to come near the object and drag it from its place without the object jumping out of its position.