Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I need some help.

A topic by Loye! created Oct 24, 2022 Views: 285 Replies: 1
Viewing posts 1 to 3

So, I'm making my second unity 2D game, and I don't know where to start on a CameraFollow?  Can you help me or link any CameraFollow tutorials?

Moderator moved this topic to General Development
(+1)

The absolute easiest way is to use cinemachine.

Unity Docs // Cinemachine

  1. Install Cinemachine from the Package Manager [in Unity registry]
  2. On your Main Camera add a Cinemachine Brain component 
  3. Then from the Create menu > Cinemachine > Virtual Camera, it will come with a default name of something like CMVCam1, reset t's transforms
  4. If t didn't happen automatically, there should be a place on the Cinemachine Brain component of your main camera to link the virtual cam, link them
  5. On the virtual camera, under Follow, drag in the GameObject you want it to follow [i.e. the player] Under Body set it to Framing Transposer
  6. Play around with the camera settings until it looks good to you! [Camera Distance is a big one; Dead Zone width and height will change how quick the camera is to catch up to the follow object]

Hope that helps! :)