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 Dreave · Sep 17, 2011 at 09:26 PM · shootinggun

Bullet Script Help

I have a script which is from the fps tutorial on the unity website which allows you to shoot a bullet prefab, but what it dosent do is spawn my bullet prefab at the end of my gun, please can anyone help? For some reason I cant get the script to look correct on this question even with the code sample button so here is the link. http://download.unity3d.com/support/resources/files/FPS_Tutorial_1.pdf

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 Waz · Sep 17, 2011 at 10:27 PM 0
Share

Where does it spawn from ins$$anonymous$$d?

avatar image Dreave · Sep 18, 2011 at 06:59 PM 0
Share

in the centre of my screen

3 Replies

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

Answer by Clunk · Sep 19, 2011 at 04:37 AM

Make a small cube at the end of your gun and turn off the "Mesh Collider" component to make it invisible. Attach the fire script to that cube.

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 Waz · Sep 19, 2011 at 06:19 AM 1
Share

This is a round-about way of making an Empty, which can be made from the GameObject menu.

avatar image Dreave · Sep 19, 2011 at 06:42 AM 0
Share

it spawns at the end of my gun now but it go downwards ins$$anonymous$$d of firing straight please help.

avatar image Dreave · Sep 19, 2011 at 06:55 AM 1
Share

dosent matter ive fixed it

avatar image
1

Answer by henry96 · Sep 19, 2011 at 06:55 AM

oh!!! I think the axis-z of your spawn point is facing down. That's why the bullet is going downward. So try to rotate the spawnpoint to make the z-axis facing forward!

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 Dreave · Sep 19, 2011 at 03:35 PM 0
Share

works now thanks

avatar image
-1

Answer by Clunk · Sep 19, 2011 at 04:26 PM

Ye, I was gonna say, rotate it lol.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Timing Between each Gun Shot 2 Answers

Mouse look alteration? 1 Answer

Animation On Mouse Click 1 Answer

Basic Shooting Game 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