Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Tried all the ways but can't do it!

Discussion in 'Scripting' started by JKMS, Jul 11, 2015.

  1. JKMS

    JKMS

    Joined:
    Nov 1, 2014
    Posts:
    37
    I unfortunately clicked on this video and it made by day interesting . I don't know scripting and im a beginner to Unity3D , I have Unity 5.1 , I would like to have a tutorial on getting this effect . I took forward to this topic and will be appreciating to all your positive comments.

    Thankyou
     
  2. JKMS

    JKMS

    Joined:
    Nov 1, 2014
    Posts:
    37
    I need to shake the camera like in that video while RUNNING .
     
  3. Magnite7

    Magnite7

    Joined:
    Dec 12, 2012
    Posts:
    125
    For one, you should really look into learning scripting and the basics of programming before you start anything too math or outside class/function reliant like this. This way you are more prepared for the paths you may need to take.
    https://unity3d.com/learn/tutorials/modules/beginner/scripting

    Second, the Unity Characters package includes a script called "HeadBob.cs", I would recommend importing this and looking through it to try to understand the pieces of it. Then work on getting this to work with a character movement script.
     
  4. JKMS

    JKMS

    Joined:
    Nov 1, 2014
    Posts:
    37
    @Magnite7 I am medium at scripting and I hate to ask it here , I tried my best to do this but my works were failed . So ,please someone tell me how can I get that effect .
     
  5. JKMS

    JKMS

    Joined:
    Nov 1, 2014
    Posts:
    37
    Also I checked that package and found that its for FPS , I need the head bob script for TPS .
     
  6. chubbspet

    chubbspet

    Joined:
    Feb 18, 2010
    Posts:
    1,220
    I have done this in a simplified version in the past by placing the main camera in an empty gameobject, animating that gameobject with the bobbing effect and then control that animation from code - this is also very processor friendly. If you don't want to go that route, look into Quaternions and Lerp.
     
unityunity