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

CMFreelook + Z-axis rotation(Dutch)

Discussion in 'Cinemachine' started by canis, May 16, 2018.

  1. canis

    canis

    Joined:
    Oct 25, 2013
    Posts:
    41
    in CMFreelook, we have Top/Middle/Bottom 3 different virtual camera (VC).
    I want to apply a little bit z-axis rotation, which call "Dutch" in VC Lens setting.

    however my problem is I want to control the rotation lerp timing & percentage between Middle <-> Bottom VC


    currently the effect simply just lerp between 2 different setting.
    what I really wanted to do is apply Dutch at the end of last 20%.
    e.g. AnimationCurve

    Q1) I wonder if there is any easy way to achieve the same result without coding ?

    Q2) if we must do it by create a helper script, how to identify the VC active state and percentage between those VC rig ?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,637
    Yes, it's just doing a lerp. You'll need to write some custom code to get what you're looking for. Your script should monitor CinbemachineFreeLook.m_YAxis.Value. 0 is top rig, 0.5 is middle rig, and 1 is bottom rig.

    I would attach a custom script to the FreeLook itself, get its bottom rig, and poke that rig's Lens setting in response to the value being monitored.
     
    canis likes this.
  3. canis

    canis

    Joined:
    Oct 25, 2013
    Posts:
    41
    Thanks for pointing me in that direction.