Search Unity

  1. Unity 2018.3 is now released.
    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. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

CMFreelook + Z-axis rotation(Dutch)

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

  1. canis

    canis

    Joined:
    Oct 25, 2013
    Posts:
    50
    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,945
    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:
    50
    Thanks for pointing me in that direction.