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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

How to make a gun bob while walking?

Discussion in 'Scripting' started by Amitheattack, Mar 17, 2015.

  1. Amitheattack

    Amitheattack

    Joined:
    Feb 26, 2015
    Posts:
    14
    What I would like is when I walk forwards backwards or side to side how would I make my gun bob up and down while walking to give it that walking feel?
     
  2. passerbycmc

    passerbycmc

    Joined:
    Feb 12, 2015
    Posts:
    1,739
    make a animation for it and trigger it when ever the charcter goes into his walking or running states
     
  3. Amitheattack

    Amitheattack

    Joined:
    Feb 26, 2015
    Posts:
    14
    Would there be anyway to code it?
     
  4. Amitheattack

    Amitheattack

    Joined:
    Feb 26, 2015
    Posts:
    14
    Any snips of code that I could get to use it on the gun bob?
     
  5. Crayz

    Crayz

    Joined:
    Mar 17, 2014
    Posts:
    192
  6. Amitheattack

    Amitheattack

    Joined:
    Feb 26, 2015
    Posts:
    14
    Ya I been trying to tweak it forever at this point I'm about to pull my hair out(Jokes). I made it to the point that the gun doesn't act too crazy but it is still crazy and I can not make it dim down that much anymore.