Search Unity

Free Look Y Axis too fast

Discussion in 'Cinemachine' started by Boudewijn, Jan 14, 2021.

  1. Boudewijn

    Boudewijn

    Joined:
    Mar 23, 2016
    Posts:
    15
    For a WebGL project I used the Cinemachine FreeLook Camera to orbit a table.
    I have two questions:
    1. When you release you mousebutton while moving up or down, the camera movement never stops until the 'spline' is ending. The movement now is too nervous. How can I change that.
    2. This table is scalable by html sliders. And I always want to have the whole table in screen.
    I tried the target groups and add the corner legs but that did not work correct.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    1. There is no logic by default to only move the camera when the mouse button is down. You need to add logic to suppress the input unless the mouse button is pressed. Are you using the new input system or the legacy input system?

    2. When the table is scaled very large, past the screen edges, how do you want the camera to react? Move farther away? Adjust the FOV?
     
  3. Boudewijn

    Boudewijn

    Joined:
    Mar 23, 2016
    Posts:
    15
    Thanks for your reply. I'm gonna dive deeper in it and try to add logic to the mouse button press. And indeed I think adjusting the FOV will do the trick.
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
  5. Boudewijn

    Boudewijn

    Joined:
    Mar 23, 2016
    Posts:
    15
    I use the legacy input system. Is there any need to use the new one in terms of deprecation? I tried to migrate but it is not so easy.
     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    You don't have to use the new input system Write a MonoBehaviour that implements
    Cinemachine.AxisState.IInputAxisProvider
    .

    CinemachineInputProvider is an example of this. However, in your implementation of
    float GetAxisValue(int axis)
    , don't query the new input system, query the legacy input system.