Top down Camera behavior

Hello,

I have a camera with a top down view, like for a RTS game. The movement of this camera is provide by a drag and drop movement with the mouse (like google maps for example). I want to constraint where the camera can go, with some invisible walls.

I don’t know how I can smoothly constraint my camera. Because with some box colliders (for the invisible walls, and a sphere collider for the camera) the collision is not smooth, its trembling, and I don’t see exactly how to do it. If someone have an idea …

Thank you !

Have you tried using a CharacterController for the camera movement instead of a rigidbody with a sphere collider? This will allow you to move the camera with a certain speed and it will be blocked by colliders but will not have normal physical behaviour (such as bouncing off a collider, etc).

Ok it works now thanks.