Limit scroll distance with the "Drag camera with the mouse(Or touchscreen) extension" (SOLVED)

Hi guys,

So I am trying to add a scroll function to my game shop.

I am using the below extension


with the below settings

Scrolling works fine, but I want to limit the scroll distance ?
I don’t want the camera to scroll beyond a certain point, like in the below example (Camera should not go beyond the 619 point)

Is there a way to do this? I’m not smart enough to figure it out on my own…

Hi maybe this helps define some limits

Then to move the camera

1 Like

Hi, thanks for the reply once again.

I honestly didn’t want to add a lot of events for a simple scroll camera, so I researched a bit more.

After watching this video Camera Controls - Intermediate Tutorial - GDevelop - YouTube I discovered the Enforce Camera boundaries action. And this is how I added boundaries

Really really useful action that goes well with the Move camera action

1 Like