Search Unity

Question How to make camera slightly move horizontal to center while player moves/walks?

Discussion in 'Cinemachine' started by takaraemisaito1994, Dec 5, 2022.

  1. takaraemisaito1994

    takaraemisaito1994

    Joined:
    Dec 26, 2021
    Posts:
    7
    I'm working on someone's game and I don't know how to do this with cinemachine. We have Framing transposer and POV with the new unity input system attached to the camera. So the camera can move with the gamepad and mouse. What I want to do is add a previous feature we had before moving to cinemachine. Which is the camera would slightly rotate horizontally to the center when the player walked anywhere. But it was a slow moving rotation so when the player readjusted it would start over again. But I want it to do it while the player can move the camera as well (With gamepad/keyboard). How can I do this?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    You can enable Recentering in the POV axes. It waits the specified time after user input stops, then gradually rotates back to center over the specified time. Recentering is canceled when the user does more input.