Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by sixShOOter50o0 · Jul 16, 2013 at 07:17 PM · javascriptheadbob

Head bobbing camera movement (Javascript, home made)

I got the camera bobbing from a non home-made script, and by non ome-made i mean one from the community and not made by others like you reading this thread, i'm looking for a more advanced thing that makes the camera move (Ever played crysis?) in a more realistic fashion and stops bobbing while walking into a wall. the script is about 80 lines long so i wil give you a link to pastebin: http://pastebin.com/zh8Jb8v4

i already made the script non-frame independent so the bobbing is always the same no matter the frames you got and also stop making it bob is you were to be walking and pause the game the head would keep moving up and down. it's been all day for me trying to figure this out with barely any success. thanks to whoever answers this even if it's spam xD (That's how desperate i am).

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Clinthoney · Jul 16, 2013 at 10:15 PM 0
Share

What are we suppose to name the script because it wont let me add it to that main camera

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by inkspot · Jul 16, 2013 at 11:16 PM

The head bobs because your using key input to make it bob and to walk forward, walking into a wall is still using the controls and thus bobbing, maybe making it bob on a certain vector velocity will give you the effect you want.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image sixShOOter50o0 · Jul 17, 2013 at 07:42 AM 0
Share

heh... i have barely any skills in working with vectors xD, perhaps you can help me by modifying my script, thats why i posted this question :)

avatar image sixShOOter50o0 · Jul 17, 2013 at 09:31 AM 0
Share

Np i made a new script from a previously used script that i sound on youtube and modified it to only make the camera bob only and not making you look around since i already just use the premade c# script. :) i will mark you the answer anyway since i used the vector 3 thing. :)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

18 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Accessing A Variable Across Script In A Child Object 0 Answers

Can someone help me fix my Javascript for Flickering Light? 6 Answers

Headbobbing 1 Answer

Setting Scroll View Width GUILayout 1 Answer

Webplayer String length fails? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges