Search Unity

Impulse not working

Discussion in 'Cinemachine' started by oliver_unity892, Nov 8, 2020.

  1. oliver_unity892

    oliver_unity892

    Joined:
    Oct 28, 2019
    Posts:
    91
    Hi all

    I've set up Cinemachine and it appears to work. So far I've been using it to follow the player in a fluid way, and blend to some other areas of the scene.

    However I now want to get impulse working to get some feedback to damage.

    I have an enemy object that I want to hurt the player when he touches it. I have added a collider set to trigger to the object, and the Impulse Source to the object. I've added a noise profile to the Impulse Source. I've then added an Impulse listener to the Cinemachine virtual cam.

    Both the source and the listener are set to the same channel, and the source is set to trigger on the Player layer.

    However nothing happens.

    Breakpoints show that the source is firing when the trigger is entered.

    Is there any way I can debug what might not be working? As far as I can see I have it all set up correctly.

    Any suggestions?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    Probably it's something in your settings.
    Can you show the inspectors for impulse source and the virtual camera?
     
  3. oliver_unity892

    oliver_unity892

    Joined:
    Oct 28, 2019
    Posts:
    91
    Thanks.

    Here's the source
    Source.png
    The listener
    Listener.png

    and the noise profile.
    Profile.png

    I'm not really sure how to debug issues with Cinemachine at all, so any advice is welcome.
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    It all looks good to me.
    I would attack this by elimination: first swap out your custom signal and temporarily use one of the built-in ones (like 6D Shake).
    Pump up the gain nice and high to exaggerate everything - maybe the values are just too subtle.
    Try adding a Debug.Log (or breakpoint) in the Impulse Listener. Log the impulse values that it's picking up. Maybe they're really small.
     
    dreamyguy likes this.