Search Unity

Noise = No Update

Discussion in 'Cinemachine' started by outasync, Oct 22, 2018.

  1. outasync

    outasync

    Joined:
    Mar 1, 2014
    Posts:
    48
    When I use noise on a 2d virtual camera the virtual camera position/rotation is not updated whereas the main camera transform values to change with the noise, is there anyway to have the virtual camera update its transform when noise is active?

    Many Thanks
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,724
    By default the vcam's transform reflects its raw - i.e. noiseless - position. It might be possible to do what you want. Can you post an image of the vcam's inspector?
     
  3. outasync

    outasync

    Joined:
    Mar 1, 2014
    Posts:
    48
    Thanks for confirming its the default behaviour, I had figured as much. I have solved my issue by getting the main camera transform during any noise instead.

    I have a 2d vcam and I'm using One Stop Parallax, the problem is the parallax uses the camera transform in Late Update and this produces bad jitter, so my solution was to use the vcam transform instead...but I hit an issue with noise, because the transform doesn't update the parallax doesn't sync with the noise movement.
    During any noise I use the main camera, then switch back after...bit of a hack but it looks awesome
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,724
    Glad to hear you solved it. However, there are probably less-hacky ways :)

    The CM Brain sets the Camera's transform during LateUpdate. It issues an event when it does that, so you could add a handler there. Alternatively, you could set the script execution order to be such that your script with the LateUpdate handling happens after the brain.