Trying to create a camera like this game (Nuclear Throne).
Posted: Fri May 22, 2020 6:37 am
Nuclear throne is a topdown 2D shooter roguelike that has a camera which isn't centered on the player. Instead it moves slightly towards the mouse cursor.
screenshot:
So there was this unity tutorial on how one would go about doing it, I didn't follow it but it explains the camera well:
https://www.youtube.com/watch?v=etI-2dHeufc&t=241s
Now, I am trying to create something similar, and I what I do is this :
And it works fine. But the issue is when I try to move and shoot, the camera moves in a way that makes it hard to focus on one target.
In Nuclear throne however, the camera looks like it's much more resistive to sudden movement. How can I implement this ?
screenshot:
So there was this unity tutorial on how one would go about doing it, I didn't follow it but it explains the camera well:
https://www.youtube.com/watch?v=etI-2dHeufc&t=241s
Now, I am trying to create something similar, and I what I do is this :
Code: Select all
camera.setPos((player.pos * 5 + cursor.pos) / 6)
In Nuclear throne however, the camera looks like it's much more resistive to sudden movement. How can I implement this ?