Drag&Move Actors

Hi,

I’ve run in to an issue that I am trying to resolve for a day now without any luck.

I want the player to be able to drag and move actors (simple spheres) around the scene. The game has orthographic top-down view (basically a 2D game with 3D content), so the actors can only move on the X and Y axis. The spheres are blueprint classes derived from actor, and they have set physics enabled.

My goal is, that I want the spheres to keep on moving when they stop recieving input from the player after the drag/swipe with a velocity that is somehow proportional to the ‘strength’ of the drag/swipe . Setting the actor’s location to the position of the mouse/touch and updating it every frame only works until there is a touch (obviously) and the actor stops after that.

How could I achieve this preferably using the physics system and not manually calculating the ‘strength’ based on the length of the swipe etc.? I also want the other spheres to collide and to be pushed away from the sphere that is currently being moved.

I tried using the Physics Handle component, and so far that gave me the best result, in fact, it is almost exactly what I’m looking for, except that it often produces weird ‘swing’ motions, especially when move the actor by only small amounts. My guess is that it has something to do with the constrained movement of the actors. The only application so far for the Physics Handle that I have seen was using it for things like carrying crates or something like that in first person games, so I’m not entirely sure that this is what I’m looking for.

Any help regarding this would be really appreciated.

Thanks.