Rollercoaster Tycoon-like Character Drag and Drop?

Hi there. I’m currently working on a project where I’d like to create a drag and drop system for my players main character. Like the title mentions, I’m trying to mimic a similar system like Rollercoaster Tycoon, except in a sidescroller view. Unfortunately the help I’ve found online does not seem to work well for my exact purpose.

So far I’ve tried using hit under cursor to locate the character, then teleport or setActorLocation to move the character to where the cursor is. Doing it this way I seems unnatural though because the character moves way too quickly to the mouse location, and has issues with bumping into walls and other objects (with sweep on, for some reason it teleports back to the spawning location when this happens). I’d also like to add some velocity if the player “flings” the character one direction.

I’m also working with mobile touch controls if that’s relevant.

I appreciate any suggestions you might have. Thanks!

Thanks for the reply! I haven’t used interp or timelines much, but I’ll certainly look into it.

While I’ve tried a number of solutions, my current blueprint setup is pretty similar to this UE documentation:

Although I modified it slightly to move on an XZ axis since I’m working on a side-scroller opposed to top down.

I’ll try and follow up here with a video of what I have working so far once I get the chance.

Thanks again!

Have you tried using VInterp or timelines at all to smooth the movement. Might need a bit more information about exactly what the movement you’re trying to implement is and probably a screenshot of how you are currently doing it.

you can disable collision on the object that youre dragging, which should make it stop detecting collisions with walls and stuff. and the Mouse X and Mouse Y events have an Axis value, which is between 0 and 1 but you can multiply them and do some math to make the velocity for the player that your flinging.