Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Is there a way to reset brain without any blend?

Discussion in 'Cinemachine' started by BigGreenPillow, Sep 11, 2018.

  1. BigGreenPillow

    BigGreenPillow

    Joined:
    Dec 2, 2013
    Posts:
    12
    I have custom blends set to a couple of different VCams but when the player dies and resets I need the player camera to instant cut to the new position, what is happening right now is that if there was a VCam active when the player dies it always smoothly transition to the new position.

    This VCams already have custom blends for the main camera since they already transition to each other during gameplay, is there a way to force a instant transition or to resent the blend by code when I'm reseting the game? Nothing so far seems to be working, I tried to play around with brain.ActiveBlend properties but nothing seems to be able to achieve this result.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,926
    There are a couple of ways to do this.
    1. Have a special "game into" vcam that gets activated when the game resets. Set a custom blend to cut to this vcam always. Then, blend to the play vcam.
    2. Or, if you want just to warp the player to the new position together with the current vcam, there is an API call for this. See this post: https://forum.unity.com/threads/rep...how-to-avoid-the-popping.514293/#post-3396611
     
  3. BigGreenPillow

    BigGreenPillow

    Joined:
    Dec 2, 2013
    Posts:
    12
    Thanks! The first method worked, I created a copy of the gameplay vcam with high priority and enabled it for a couple frames and disabled it after reset.

    The second method didn't seem to work though, probably since I don't have any vcam that actually follow a transform with the default behaviors that API call doesn't seem to help.