Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    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. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    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,731
    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.