Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Question Trigger a boolean after recentering is done

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

  1. MoonBeam91


    Jan 28, 2021
    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


    Unity Technologies

    Dec 22, 2016
    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.