Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Cinemachine Impulse Shake wont return to original position after shaking

Discussion in 'Cinemachine' started by scozirge, Apr 15, 2022.

  1. scozirge

    scozirge

    Joined:
    Feb 24, 2015
    Posts:
    77
    I use Cinemachine Impulse Listener and Cinemachine Impulse Source to generate a shaking effect but it won't return to its original position after shaking. How do you make the camera back to its original position?

    This is my setting.

    upload_2022-4-16_5-50-45.png
    upload_2022-4-16_5-51-3.png
    upload_2022-4-16_5-50-24.png
    upload_2022-4-16_5-52-10.png
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,233
    It's normal that in the absence of logic that tells the camera where to be, the impulse will shake an object randomly and just leave it where it ends up (think of what happens to real-life things in an earthquake).

    Because you have "Do Nothing" in Aim and Body, there is nothing that tells the camera where it "ought" to be. Try replacing CInemachineImpulseListener with CinemachineIndependentImpulseListener, which has logic to return the object to its unshaken position.
     
    SassyPantsy and scozirge like this.
  3. scozirge

    scozirge

    Joined:
    Feb 24, 2015
    Posts:
    77
    Thank you, I got it!
     
  4. Prosto_Lyubo

    Prosto_Lyubo

    Joined:
    Aug 15, 2013
    Posts:
    8
    I'm using CinemachineIndependentImpulseListener and my object (UI) does not return into position (0,0,0) after multiple shakes are applied in a short period of time. Can you make sure the object returns to its original position after shaing? Thanks!
     
  5. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,233
    It is supposed to return to its original position. Can you send me a scene that reproduces the problem?
     
  6. SassyPantsy

    SassyPantsy

    Joined:
    May 17, 2020
    Posts:
    136
    I'm having the same problem. cinmemachineindependentimpulse listener with both a follow and look at target that doesn't reset.
     
  7. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,233
    It is supposed to return to its original position. Can you send me a scene that reproduces the problem?