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 Edyvargas · Nov 23, 2011 at 10:13 AM · fpsweaponbob

Better way to make a Weapon Bob animation when walk

Hi, what could be the best way to make a weapon bob animation when the player its walking or running on a FPS?

Using a predefined animation for each case, and then play the animation when the player its walking or running with a script...

or

make the weapon bob animation using only script (i dont know how to do it yet, perhaps its easy to manage the animation transitions this way?).

Thanks for any advice on how to do it the better way...

Comment
Add comment · Show 2
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 Mox.du · Nov 23, 2011 at 04:35 PM 0
Share

Why don`t you try to search for it? Enter "bob" in search box and see what happens.

avatar image Edyvargas · Nov 23, 2011 at 11:43 PM 0
Share

Thanks, i already do that, the meaning of this post its to know what think a more experienced user about this specific matter...(i edit the title to fix this).

2 Replies

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

Answer by Kacer · Nov 24, 2011 at 11:08 AM

The easiest way, for me at least, would be to animate it, scripting your way out of something like this would require that you had some bones to which you could add some rotation scripts, to simulate movement, getting that stuff right wouldnt be an easy task.

On the other hand, if you use an animation you'd have full control over the character and the weapon bob animation, and it would be way easier to make adjustments.

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 Edyvargas · Nov 24, 2011 at 04:30 PM 0
Share

Thank you $$anonymous$$acer, using animations would be the easiest way for me too, if anybody knows what could be the better way to handle transitions from one animation to another and the fire animation while you are still walking, please make a comment about it...Thanks again!

avatar image Kacer · Nov 24, 2011 at 04:37 PM 0
Share

You're welcome :)

avatar image
0

Answer by noswadecyrb · Nov 24, 2011 at 09:34 PM

the easiest way to make the weapon bob using script would be to change the y position over time using a sine or cosine function with the Mathf.sin() of Mathf.cos(). If you don't understand what that means it would be easiest for you do pre written animation

Comment
Add comment · Show 1 · 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 Edyvargas · Nov 25, 2011 at 05:34 AM 0
Share

Ok, thanks.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

unlocking weapon (fps) 1 Answer

Weapon placement and animation 0 Answers

FPS Camera+weapon setup? 0 Answers

Select Object ( Weapon ) Quick! Help! xD 1 Answer

FPS animations for different purposes? 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