Aiming inside Cinemachine- Game Dev Series 171

Objective: introduce the Aim function under virtual camera.

Aim is a controllable function when there is an object had been assigned to Look At column in a virtual camera. There are tons of adjustable options under Aim section, which is what we are going to discover in this article.

Accurate aiming

Aim section only works when there is a target can be looked at. We need to assign a cube to virtual camera first.

Now let’s open the drop down menu of Aim section and review these options one by one.

The first part: Tracked Object Offset. This is a section that can make a center offset on 3-axis of target object.

Let’s create a simple movement animation to cube, that we can adjust the upcoming options more obviously.

The next function is Lookahead Time.

Lookahead Time can make the camera moves slightly ahead of target movement. This function would be use commonly at some platformer game, when Player needs to know what is ahead of its player.

Before using Lookahead Time
After using Lookahead Time

The next is Horizontal Damping and Vertical Damping.

These 2 functions would decreases the reaction range of camera movement when the value is increasing. When value gets higher, the responding function(horizontal or vertical) would move smaller and slightly delay to decrease the frequency of camera movement.

Game window guides

When selected virtual camera from Hierarchy window, you should notice some guide lines from Game window. If you don’t, you can enable these guides in the Inspector.

With these guides, we can explore more about virtual camera.

  • Screen X & Y
    This would be the offset of camera center.
  • Dead Zone
    This would set the edge of dead zone from the center of camera. Only when object is reaching the edge of dead zone, camera would start following.
Notice camera only moves when the center of object(yellow dot) reached the edge.
  • Soft Zone
    This would set the size of blue zone, which means it would downsize the red zone(the area that object would never reached). This can limit your object within a very restricted area.
  • Bias X & Y
    Unlike Screen X & Y, this can especially limit the camera moving space on x or y-axis without moving the center of camera.

That would be all of quick introduce the function under Aim of virtual camera. I would keep exploring the powerful function of Cinemachine in the upcoming articles.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
S.J. Jason Liu

S.J. Jason Liu

A passionate gamer whose goal is to work in video game development.