Camera2D and panning

Does anyone have any good examples on how to do camera panning with MGE? Like right-click and drag to move the camera?

https://json.codes/blog/xna-camera-for-2d-games/

But why MG.E? (I don’t fully understand MG.E yet though)

EDIT

Search query:
https://www.bing.com/search?q=2D+Camera+Lerping&qs=n&form=QBRE&sp=-1&pq=2d+camera+lerpi&sc=0-15&sk=&cvid=9E0DECFAA5E74186B7D264671F8E5BE0

I use MG.E because they do nifty stuff like ecs, viewports, spriteanimations and a whole bunch of good other usefull stuff.

I meant I don’t know how or why or if it affects basic operations/coding, any luck with that link?

EDIT

Just for reference:

This is the Camera that I made. Its completely independent from everything except Monogame itself. You can configure the update logic to move how ever you want. It has Zoom, WASD movement and has a VisibleArea for use in culling. Feel free to use it however you see fit.

2 Likes