<SOLVED>Using the cursor to control the view

Hi guys! Just wondering if someone here know how to control the camera view using the cursor? I’m thinking of something like LoL or Dota2 where you can explore the map with your mouse and when the cursor is at the edge of the screen the camera moves with it. Thanks!

I would look at adding a layer that doesn’t scroll like the map (that works like a UI layer, for example).

When the mouse is at the edge of that layer, scroll the map layer in the appropriate direction.

The cursor check is :


The camera reposition is :


The limits are just suggestions. Play with them to get margins that are to your liking.

1 Like

Thank you very much! I was thinking about this for quite a while now and got stuck finding the answer on my own. Cheers!