Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Is it possible to clamp rotation noise to be above 0?

Discussion in 'Cinemachine' started by IMIv2, Jun 23, 2022.

  1. IMIv2

    IMIv2

    Joined:
    Jun 25, 2018
    Posts:
    13
    I'm using a cinemachine impulse on my cinemachine virtual camera to simulate recoil. When my gun shoots, i create an impulse, everything looks fine, but the camera rotates up and down since the impulse is generated by a wave signal? i'm not 100% sure how it works :D The problem is that for recoil it is not what i want, i want it to climb UP and not up/down.

    I'd like to move the whole curve above the 0 line if it is even possible(like in the image i attached). I also attached an image of my impulse source settings.

    I'm sort of clueless on how to do it but this is the closest i got towards it not looking terrible.
     

    Attached Files:

  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    One way to do that is with a FixedSignal asset, which allows you to draw your own custom curves in X, Y, and Z.

    upload_2022-6-23_8-45-49.png
     
  3. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    You can also shift the signal by a constant value away from 0 by adding a non-random component of frequency 0, like this:

    upload_2022-6-23_8-52-34.png