How do I make a camera system similar to the one in Nuclear Throne

I am trying to make a top down camera similar to the one in Nuclear Throne(Gameplay here: Nuclear Throne Gameplay (PC HD) [1080p60FPS] - YouTube), I want to be able to get my cursor position and calculate the distance between the player and the cursor, then set the camera’s X value to that distance divided by 2.

1 Like

Something like this ?

3 Likes

Exactly like that! Thank you!

2 Likes

Coming back to this, I’m trying to make it so that every time you fire a weapon, the camera jolts back in the direction of the player for a moment, do you know how I could implement this?

Usually it’s done using Camera Shakes

Ah, i see, is there a way to only add a single impulse in one direction instead of a continuous shake?

This is again in the same style as Nuclear Throne