Search Unity

Force ClearShot to change cameras?

Discussion in 'Cinemachine' started by Rtyper, Jul 10, 2017.

  1. Rtyper

    Rtyper

    Joined:
    Aug 7, 2010
    Posts:
    452
    Hi there,

    First off - Cinemachine is amazing! I've been replacing the camera system in a racing game project with it and so far it's been a breeze. I'm using a clear shot camera setup with a whole bunch of child cameras as a "cinematic" camera option during replays, and it mostly works great, the one problem though is that I'd like to have the shots change from time to time, even when the current shot isn't obstructed.

    I've written a simple script to count down a timer that resets on cinemachine's cut event, but I'm having trouble finding how to manually trigger a cut. I've hunted through the API, but I couldn't find anything obvious. Is there some way to do this? Or am I even over-complicating it and there's some setting in ClearShot that I missed!?

    Cheers!
     
  2. Adam_Myhill

    Adam_Myhill

    Joined:
    Dec 22, 2016
    Posts:
    342
    hi @Rtyper , great question. The easiest/most versatile would be to trigger a Timeline sequence and have multiple ClearShot clips on the Timeline giving you cuts at any frequency you want. That way you can even have multiple Timelines with different sequence styles - a fast cutting one for high speed crashes, a slower one for other types, etc.

    If you're not in 2017.1, then you can trigger cuts by just activating ClearShot cameras in any timing / order you'd like. Remember to set the cuts/blends appropriately on the ClearShot and on the Cinemachine Brain as well as the camera priorities.

    That help?
     
  3. Rtyper

    Rtyper

    Joined:
    Aug 7, 2010
    Posts:
    452
    Thanks Adam. I had set up a quick hacky way of doing it by putting up a collider between the current camera and the target, which did the trick but obviously isn't great!
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    @Rtyper There is no "CutNow" API in ClearShot, but I agree with you that there should be. Excellent feature idea! Thanks!
     
    Rtyper likes this.
  5. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    @Rtyper This feature had been added and will be in the next point CM release. Thanks for suggesting it.
     
  6. Rtyper

    Rtyper

    Joined:
    Aug 7, 2010
    Posts:
    452
    Oh, that's great! Thanks a lot!
     
  7. chuckgriff

    chuckgriff

    Joined:
    Mar 4, 2015
    Posts:
    4
    Hi - was this ever added? I have been unable to find anything for it in the ClearShot API. Thanks.
     
  8. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    @chuckgriff CinemachineClearShot.ResetRandomization()
     
  9. chuckgriff

    chuckgriff

    Joined:
    Mar 4, 2015
    Posts:
    4
    Gotcha - thanks!