Making an RTS game #10: Moving the camera (Unity/C#)

Today, let’s continue our RTS project by adding some camera movement!

Mina Pêcheux
CodeX
Published in
10 min readMay 13, 2021

--

⬅️ Tutorial #9: Implementing character units and skills | TOC | Interlude #2: Refactoring the event system ➡️

📕 Get the ebook and bonus material on Gumroad!
🚀 Find the code of this tutorial series on my Github!

In this episode, we’ll talk a bit about graphical projections and camera set up, and then we’ll do some user input handling and reuse the notion of coroutines we saw last time.

At the end of this tutorial, we’ll be able to move the camera with the mouse or the keyboard, and to zoom in and out:

Note: the trees and rocks in this movie and the following screenshots are free assets I found in the Unity Asset store, taken from the low-poly tree and rock packages by BrokenVector.

Graphical projections: perspective, orthographic, axonometric…

Video games are displayed on 2D screens. So, as they started to put more and more 3D objects in our games…

--

--

Mina Pêcheux
CodeX
Writer for

I’m a freelance full-stack web & game developer. I’m passionate about topics like CGI, music, data science and more! Find me at: https://minapecheux.com :)