Camera2D : set offset outside the limits

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By groug

Hi,

I have a Camera2D with limits set to the current room (the game is split into rooms), drag margins and smoothing to get a cool camera scrolling.

Recently, I’ve hit a wall regarding camera shakes/quick movements (like a forward camera offset anim for a punch/sword attack), using offsets animation (using a Tween):
Everything’s fine except when the player is near the limits of the camera: offsets won’t move the camera “outside” the limits, so the movement doesn’t happen. If I change limits or margins, the scrolling won’t be what I want. If I dynamically change the limits to be able to apply an offset, the camera will automatically move to respect the new limits…
Any idea how I can make the camera shake near limits? I was thinking maybe a viewport a bit smaller and moving the viewport instead?

Thanks!