Search Unity

How to get Cinemachine Input X Axis Name?

Discussion in 'Cinemachine' started by fabianschmidt2512, Jan 3, 2021.

  1. fabianschmidt2512

    fabianschmidt2512

    Joined:
    Apr 30, 2020
    Posts:
    25
    Hello,

    I am currently working on a project in Unity with a Thrid-Person Character Movement. I want to change the Cinemachine Input X Axis Name when double tapped on the screen to the "Mouse X" string to enabled the free looking. But I haven't found any solution yet. I read through the posts of "public float GetAxisCustom(string axisName)" but this only returns the value of the axis name. But I want to change and get the axis Name it self as a string.

    Maybe anyone can help me out!

    Thanks a lot!
     
  2. fabianschmidt2512

    fabianschmidt2512

    Joined:
    Apr 30, 2020
    Posts:
    25
    Okay, I got the solution myself:

    freeLook = cinemachine.GetComponent<CinemachineFreeLook>();
    freeLook.m_XAxis.m_InputAxisName = "TButton";
     
    Oxyphara, hananraina and Gregoryl like this.