How can I create a smooth camera drag after release?

Hi guys,

So I have this code for my character selection screen.

The player can simply drag up and down in order to navigate the menu

Now this works fine, but I was wondering, is there a way to make the drag movement a bit smoother? I think the correct way to say it, is there a way to give it force? RIght now if you stop dragging, the camera stops immediately. I want the camera to keep moving and lose speed slowly based on the force you put on the drag.

I think I once did something similar but I just don’t seem to remember how.

Hahaha, that’s a funny way to bump the thread :slight_smile:

Instead of moving the camera, create a new hidden object that the mouse drag moves around. Then use the smooth camera extension (or the lerp function) to move the camera towards the hidden object.

1 Like

Haha thank you, this seems the most logical solution.

I will see how I can make it work