rts camera script help

ok so I’m making an RTS-style camera script for fun. I’m wanting it to be similar to StarCraft 2’s camera, in that you move it when your cursor is at the edge of the screen or you click somewhere on the mini-map. I’m not sure how to go about doing this though. The first thing I want to do is making it so when your cursor is at the edge of the screen, it moves in that direction.

Should I use transform.translate?
The script is attached to the camera so I feel like perhaps a Character Controller or RigidBody might be unneeded resources or an unnecessary hassle.

Should I use raycasting to tell where my mouse cursor is?
I remember reading somewhere that that’s how someone did it I think but I might be wrong. Or are there better ways? I could store say the screen’s width and height in variables and just check if the mouse cursor’s position is around there, but idk how to check the cursor’s position.

Screen.width
Screen.height
Input.mousePosition

You can use these, they are variables that contain screen size and mouseposition…