Search Unity

  1. We've closed the job boards. If you're looking for work, or looking to hire check out Unity Connect. You can see more information here.
    Dismiss Notice
  2. Unity 2017.2 is now released.
    Dismiss Notice
  3. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  4. If you're a macOS 10.13 High Sierra user take be sure to read this before updating Unity.
    Dismiss Notice
  5. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  7. Unity 2017.3 beta is now available for download.
    Dismiss Notice

Can the freelook camera's motion be limited by additional keys?

Discussion in 'Cinemachine' started by Sendatsu_Yoshimitsu, Dec 7, 2017.

  1. Sendatsu_Yoshimitsu

    Sendatsu_Yoshimitsu

    Joined:
    May 19, 2014
    Posts:
    481
    I would ideally like the freelook camera to only move or zoom when I'm holding a mouse button/key, and to ignore mouse motion and remain where it is when that key isn't depressed. Since the freelook camera is currently extremely clunky with seemingly hardcoded axes, the best solution I've come up with is manually positioning a second, stationary camera directly on top of the freelook camera, and switching between the two when I press a key. This very technically works, but it's incredibly clunky; is there any chance the API supports more nuanced controls for freelook?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    588
    Axes are not hardcoded. You can put any axis names you like, and input manager will be queried for the values. There is also a hook in CinemachineCore that allows you to provide a custom function to get the values, replacing the input manager.
     
  3. Sendatsu_Yoshimitsu

    Sendatsu_Yoshimitsu

    Joined:
    May 19, 2014
    Posts:
    481
    Ooh I wasn't aware there was a hook now, that helps a lot!! Thanks :)