Search Unity

Disable freelook input

Discussion in 'Cinemachine' started by mrCharli3, Jun 20, 2018.

  1. mrCharli3

    mrCharli3

    Joined:
    Mar 22, 2017
    Posts:
    976
    Is it possible to disable the ability to use the freelook of the freelook camera? I would like to have it disabled while all my other inputs are disabled.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,720
    Yes, there are a couple of ways.
    1. Set the input axis names to blank, or
    2. Set the CinemachineCore.GetInputAxis delegate to a function that always returns 0. This will disable all user input for Cinemachine. To restore it, put pack what was there before.
     
    Last edited: Jun 20, 2018
    pango, sharkapps and mrCharli3 like this.
  3. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    194
    could really benefit from a simple boolean to enable this functionality!
     
  4. Jean-Fabre

    Jean-Fabre

    Joined:
    Sep 6, 2007
    Posts:
    429
    Hi,

    I agree, this should be something more intuitive and less destructive in terms of setup.

    Bye,

    Jean
     
  5. tmendez

    tmendez

    Joined:
    Oct 12, 2015
    Posts:
    39
    How would I go about setting the delegate to always return 0?
     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,720
    tmendez likes this.