Search Unity

cinemachine freelook if right clicked.

Discussion in 'Cinemachine' started by JerMurder, Nov 30, 2021.

  1. JerMurder

    JerMurder

    Joined:
    Jan 5, 2021
    Posts:
    70
    Hey!

    I have a problem i am new with cinemachine so i dont know how to do it so if u hold right click it would only rotate the freelook around my player but if right button is up it should just lock to the position and rotation that it had before holding off the button
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    You'll have to give a little more information.
    What version of Unity?
    What version of Cinemachine?
    Are you using the new Input package, or are you using legacy input?
    Also: when the mouse button is not pressed, how should the camera behave as the player moves and turns? Where should the camera be in relation to the player?
     
  3. Vadorzo00

    Vadorzo00

    Joined:
    Jul 16, 2015
    Posts:
    1
    Hello,

    Is there any way with New input manager.
    But how I made it.
    if( any button has pressed)
    {
    camera.xAxis.maxSpeed = 200f;
    }else
    {
    camera.xAxis.maxSpeed = 0f;
    }