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 name111 · Sep 18, 2010 at 02:06 AM · cameragunweaponturret

Creating a Mounted turret

hey guys i've been trying to figure this out. how can i make a weapon that is mounted (in other words stuck where it is) useable(FPS Game). i have the ability to pick up weapons, but i dont want to "pick it up permanently" but create and get on and off type weapon, similar to the MG in call of duty series and games like that.

thanks in advance

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 Peter G · Sep 18, 2010 at 03:18 AM 0
Share

You should try to keep one topic to one tightly related question. If, the physics and audio are "unrelated", then don't put them in this question. Either make a new one or search for it.

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by fireDude67 · Nov 30, 2010 at 05:43 AM

Have a trigger zone around the turret and in OnTriggerEnter() check if user has pushed your Use button. If they have, make the player invisible (GameObject.visible?) by using player.gameObject.active = false and then switching the current Camera off and the Turret's Camera on. Then you need to write a script to control the turret

Edit: To make a trigger zone, go to GameObject -> Create Other -> Cube, resize the cube until it is the right size for your trigger zone, then on the box collider check Is Trigger and remove the Mesh Renderer. Then tag your player as Player and then you can check if your player walks into the trigger zone like this:

function OnTriggerEnter(collision : Collider) {
    if (collision.gameObject.CompareTag("Player") {
       // Player has walked into trigger zone.
    }
}
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 name111 · Dec 06, 2010 at 08:47 PM 0
Share

how would i make a trigger zone?

avatar image fireDude67 · Dec 28, 2010 at 07:44 PM 0
Share

edited post to show how to make trigger zone

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

No one has followed this question yet.

Related Questions

How to make weapon orbitiong player and follow the camera at the same time like shown in video below? 1 Answer

Help with Lerp 0 Answers

How do I stop my FirstPersonController weapon from moving away from the camera position when I look up and down? 2 Answers

FPS - Gun Delay while Rotating 0 Answers

How do i get a weapon to follow the first person controller up and down? 0 Answers


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