• 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 mattkell462 · Feb 21, 2018 at 09:51 AM · collisionprojectile

Random Projectile Generation

Can someone help me create a script for projectiles with collision, where when the spacebar is pressed one of two randomly selected projectiles will be shot forward.

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 Gruffy · Feb 21, 2018 at 01:11 PM 0
Share

Hey $$anonymous$$att***, I am happy to guide you through this but cannot until later this afternoon around 6pm U$$anonymous$$ Time. It sounds like you need a bit more education surrounding the engine firstly and that is also something I am happy to help with. People on here may sometimes come across as a little pedantic when you straight up ask for a script to be written, denoting you have likely not searched thoroughly enough into the area of concern (as an example projectiles are an arguably well discussed topic on these forums blah blah blah) ebfore posting. Im sure that is not the case and you are just at frustration road due to the overwhel$$anonymous$$g amount of info to take in concurrently n all that. I know how frustrating it is at the start and we are all subject to getting it wrong in the beginning and continually, haha(I know im not immune for sure) .

You asked a question on an answer I gave a while back and I have commented to confirm what the 2nd destroy call was doing. As a starting post, take this script and try to apply it to a game object and see what happens...Hopefully we can go onwards from that stumbling block if you have no success. Anyway , you are welcome to contact/ P$$anonymous$$ me for advice as I have a little spare time later. ... gruffy.wright@gmail.com ... will get my attention quicker than most other contacts so use that if you would like to chat outside of the forum :) Although keeping it here always benefits others (an important trait of any forum of course.) Sorry that was a waffle [but with good intent] Gruffy

@tormentoarmagedoom - is right tho, your question is more of a complete ask than a possiblity of guidance after your attempts have failed somewhat, which is what your future posts would benefit by [a notable effort/ attempt first]. So they get a reward

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by tormentoarmagedoom · Feb 21, 2018 at 11:51 AM

Good day @mattkell462 !

You are not asking how do something specific, you are asking the whole complete script. First, make an script, try to do it yourself, look for the information, test your scripts .... and everithing you dont get, you can ask for it. I recommend to look at this pages:

  1. https://unity3d.com/es/learn/tutorials/temas/multiplayer-networking/shooting-single-player (only for the shooting, not the multiplayer)

  2. https://docs.unity3d.com/ScriptReference/Input.GetKeyDown.html

  3. https://docs.unity3d.com/es/current/Manual/CollidersOverview.html

If you expect someone will do the script for you, maybe you are not ready to make a game.

Accept answer if it helps.

BYE!

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

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

Related Questions

Finding a script on an object 1 Answer

Building project (web or win) breaks charactercontroller 0 Answers

Most efficient way to handle projectile collisions? 2 Answers

[Solved]Shoot a projectile towards a target location. 3 Answers

How should I make the projectiles in a fps go straight to the middle of a screen? also, collision problems 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