Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Keith18127389 · Jun 12, 2011 at 04:04 AM · fpsnoobsway

FPS gun movement

How do i make my gun sway like in call of duty 4?

Comment
Add comment
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

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by FutchProductionsSyndicate · Jun 12, 2011 at 04:36 AM

Use an animation.

Or use gradual motion using the MAthf.lerp function to make it slowly sway from side to side.

But an animation is MUCH easier.

Comment
Add comment · Show 3 · 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 Keith18127389 · Jun 12, 2011 at 04:53 AM 0
Share

@FutchProductionsSyndicate Thanks man i will try that it makes sense now.

avatar image Keith18127389 · Jun 12, 2011 at 04:54 AM 0
Share

@FutchProductionsSyndicate one more question how do i play the animation while i look to the sides on the mouse?

avatar image FutchProductionsSyndicate · Jun 12, 2011 at 05:50 AM 0
Share

@$$anonymous$$eith18127389 Sorry, i'm not quite sure how to do that. what you could do is a combination of animations and a Lerp.... Have it loop an idle animation of the gun bobbing and swaying, and when you look to the sides, use the $$anonymous$$athf.lerp function to gradually move the gun and rotate it slightly.

I'm not completely sure how that would work with the animation, but I think it should work fine.

avatar image
0

Answer by Yanger_xy · Jun 12, 2011 at 04:37 AM

"duty 4 " I haven't played it yet.Can you describe your question in another way?

NOTE TO MYSELF: I should use a comment next time. Not a answer! -- OrangeLightning :)

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 FutchProductionsSyndicate · Jun 12, 2011 at 04:42 AM 1
Share

Please do things like this as a comment, and he means in the game, "Call of Duty 4" how the gun sways side to side and bobs up and down to make it look like you are walking.

avatar image
0

Answer by Kieran Chandler · Oct 15, 2011 at 04:14 PM

make it rotate the same way you make the camera rotate. it is simple. one problem you may find is that it begins to move off of the screen. this is simple to fix just use the Mathf.Clamp() function that is how i did it

Comment
Add comment · 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

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Vector3.Lerp and Animations 0 Answers

Aim Down Sights and Weapon Sway not working unless animations are not assigned 0 Answers

Why does the FPS Tutorial robot walk like a cross? 1 Answer

why is the mouse look messing up on the new fps character 0 Answers

Urgent! Rotation question! 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