Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Rotating Cinemachine POV through scripts

Discussion in 'Cinemachine' started by sevensixtytwo, Oct 8, 2018.

  1. sevensixtytwo


    Apr 5, 2013
    Hi all.

    So I'm using a Cinemachine POV component to look around with touchsticks by modifying the input value. Is there any way I can orient the camera without using the touchsticks? I'd like to implement a "Reset Vertical Look" or even make the rotation gravitate towards the current softlocked target.

    Experiments with Quaternion.RotateTowards in various configurations have failed to produce any noticable results, at least until I turn off the cinemachine scripts which also disable my input. Directly modifying the input values is pretty innacurate.

    Here's an example of my project's gameplay:
  2. Gregoryl


    Unity Technologies

    Dec 22, 2016
    The axis Input value generates an impulse whose result is to change the axis's Value. You can manipulate the axis.Value directly from script as well.

    The POV component's m_HorizontalAxis.Value and m_VerticalAxis.Value represent the Y and X rotations, in degrees, from world forward if vcam is not parented to anything, or parent's forward if it is.