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!