Search Unity

Simple Camera Shake On a FreeLook following the player

Discussion in 'Cinemachine' started by mrCharli3, Nov 1, 2018.

  1. mrCharli3

    mrCharli3

    Joined:
    Mar 22, 2017
    Posts:
    976
    I've managed to create some cool camera shakes using noise before, but can't really figure out a good way to trigger a camera shake on a FreeLook Camera that is following a player, from a Script.

    Is there any type of example code that might be able to help me get started making this type of script? I Tried looking at your GitHub but can't really find anything similar, and don't really know where to start.

    I also read that something called "impulse" would be coming a few months ago, but can't seem to find anything on it?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    Yes, Impulse has been released and it's bundled with the latest CM, available via the package manager. Which CM version are you using?
     
    mrCharli3 likes this.
  3. mrCharli3

    mrCharli3

    Joined:
    Mar 22, 2017
    Posts:
    976
    I Use 2.2.7, newest one from PM I think?
     
  4. mrCharli3

    mrCharli3

    Joined:
    Mar 22, 2017
    Posts:
    976
    Ok found the thread where you say to uninstall current Cinemachine before using PM. Fixed
     
  5. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    So, in the CinemachineExamples, there is a scene that demonstrates the use of Impulse. You can have a look at that to get started. Also, here is some preliminary doc.
     

    Attached Files: