Search Unity

triggering an even when the camera sees the thing

Discussion in 'Cinemachine' started by laurentlavigne, Jan 24, 2020.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    I just started using cinemachine for production and so far I love it. The dolly is new and it just works. Some momentum would be awesome, it has a different look than your damping and then I can have that nice technocrane look.

    So I'm trying out Unity to make previs from scratch instead of Maya and there is a scene with a massive number of object that must play an animation when they're about to enter the camera view.
    It's not a runtime thing, it's a timeline thing so I can't use
    [URL='http://unity3d.com/support/documentation/ScriptReference/Renderer.OnBecameVisible.html']Renderer.OnBecameVisible[/URL]

    How would I do that?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    Good idea about momentum. We will look into adding this, but it does bring some added complexity. In the meantime, it's very easy to augment the vcam with a custom script that manipulates the vcam's path position with momentum. Do you have access to someone who can write that code?

    It's not clear to me why OnBecameVisible() won't work for you. Perhaps it won't work in timeline preview mode, but you should get the events if you run the timeline by playing the scene. Is that not enough for your needs?