Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

Question Trigger a boolean after recentering is done

Discussion in 'Cinemachine' started by MoonBeam91, Mar 10, 2023.

  1. MoonBeam91

    MoonBeam91

    Joined:
    Jan 28, 2021
    Posts:
    35
    I want to trigger a boolean after m_RecenterToTargetHeading is done.

    I am trying to implement free look , and my character currently follows the camera. I can enable the free look and make the character move independent of the camera direction. But when I disable the character instantly turns towards the camera direction.

    TLDR I want the character to follow the camera only after m_RecenterToTargetHeading is done
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    6,874
    You are asking, I think, about the interplay of a FreeLook camera with a character controller. I'm going to need more info about the character controller in order to say anything useful. Ideally, if you could put together a little test project with only a simple character, the character controller, and the FreeLook - just to isolate the problem to be solved - and send it to me, it would be much easier to iterate on it and get you the result you're looking for.

    As for triggering something when recentering is done, there is nothing built into CM for this. You would have to make a custom script that monitors the heading and fires an event when it's close enough to the "centered" value.