ConvertMouseLocationToWorldSpace not working properly

I’m working on a project where the user needs to be able to click and drag actors in the 3D world space. To achieve this, I’m using the ConvertMouseLocationToWorldSpace node to determine where the user is dragging the actor.

I’m aware I need to add the world location vector to the world direction vector with some multiplier. I’ve set this multiplier as the distance between the camera and the actor, so the actor stays the same distance away.

Below is my Blueprint.

It behaves as expected for the most part, except for one thing. The actor continually zooms away from the camera as long as the user is clicking on the actor. Below is a screenshot of the in-game view, with the length of the vector to the actor being continually printed.

I’m new to Unreal, so I’m pretty sure I’m doing something wrong, but I can’t figure out what. Any help would be much appreciated. Thanks!

Okay, just solved it. Since it was within a tick function and the location was changing slightly every frame, the vector just kept getting bigger and bigger. What I did instead was create a variable called DirectionMultiplier and set it to the camera-actor distance before the whole dragging movement was called, keeping it constant for the entirety of this instance of the user dragging the object. And it works fine now.

Hope this helps someone in the future.