Camera Movement with Mouse – Unity3D (C#)


Camera Movement with Mouse – Unity3D (C#)

This type of camera controller is mostly used in RTS projects. You can move camera with mouse movement. There are two types of camera movement with mouse: Touch the edges of screen or drag the mouse.

In “Drag the Mouse” movement type, player holds right mouse button and drags the mouse to move camera view.

In the second camera movement type, player drags the cursor to edges of the screen. There are four edges so, we should check four possibilities.

Both solutions are pretty good, you can use whichever you want.

©Coffee Break Codes – Camera Movement with Mouse – Unity3D (C#)

Leave a comment

Your email address will not be published. Required fields are marked *