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
-5
Question by edwardsbob11 · Aug 12, 2013 at 12:14 PM · groundhow toupmakepick

How to pick a weapon of the ground

im making a kinda thriller action game and you start in a camp i want to be able to pick a weapon of the ground and be able to switch from a flash light to the gun please help

Comment
Add comment · Show 3
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 dorpeleg · Aug 12, 2013 at 12:44 PM 2
Share

UA is not for "write script for me" / general "how do I...?" questions.

Head to the forums for that.

-1.

avatar image Fornoreason1000 · Aug 12, 2013 at 12:54 PM 0
Share

This question can be answered using logic, in fact in 5 steps.

First, create the item in your scene(your item object).

Second, use logic to deter$$anonymous$$e when you can pick up the item.(distance)

Third, use a second set of logic on how the player picks up the item(key press or collision?)

Fourth, Run a function contain what the item will do(e.g +35 health).

Fifth Destroy the item so you don't pick the one thing a gazillion times.

5 Steps... not only that this question has been asked ALOT. there are also lots of tutorials on FPS that cover this.

also please spell and grammar check"pick a weapon of the ground"?

-1

avatar image ryan123321 · Aug 12, 2013 at 02:01 PM 0
Share

bend down and pick it up.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by william9518 · Aug 12, 2013 at 02:06 PM

(facepalm) How i did it is added a preferredPosition to each gun, set it child to player, release old weapon from player, set new weapon to preferredPosition, BAM i picked it up

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

20 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 avatar image avatar image

Related Questions

Object pick up script 1 Answer

Pick Up Coins 1 Answer

Picking up object occasionally causes player to fly through air 0 Answers

switching gun on screen with gun you pick up. 3 Answers

Mouse locked in center 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