Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice
  2. We've opened up a space to discuss, share feedback, and showcase everything related to the Unity Shader Graph! Come show us what you've made.
    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:
    2,277
    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.