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 Henri 1 · Mar 26, 2011 at 08:28 PM · collideemitbeam

Emit beam and collide

I'm confusing myself.

Can I emit a beam (like a round, thick laser beam, but growing) from an object and add a colider so that if that beam hits anything, it plays my kaboom animation and stuff?

Cause I cant find anything regarding the above in the settings of the line renderer?

Thanks!

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

2 Replies

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

Answer by Justin Warner · Mar 26, 2011 at 08:43 PM

Use a particle system, when you shoot, make one particle, then keep doing it while the key is down, and if it colides, you can do the animation... Can do this with ray casting or just OnColisionEnter.

Hope this helps!

Comment
Add comment · Show 4 · 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 Justin Warner · Mar 26, 2011 at 08:45 PM 0
Share

Check this out: http://musegames.com/contest/?batch=2#entries

avatar image Henri 1 · Mar 27, 2011 at 09:14 AM 0
Share

Thanks Justin! Will try, I'm just careful of particles as they tend to slow down things

avatar image Henri 1 · Mar 27, 2011 at 09:16 AM 0
Share

WOW! Thanks for the link man!

avatar image Justin Warner · Mar 27, 2011 at 11:46 AM 0
Share

Also, as Dave said, you can do the cylinder, and I thought Unity came with a glowing shader? I might be wrong, but I don't think I am.

avatar image
2

Answer by DaveA · Mar 26, 2011 at 09:34 PM

You should be able to do that. Using a cylinder mesh, and scaling the height of it (assuming you would do it slowly enough to register the collision). If you want speed-of-light hitting, use a Raycast. In fact, I'd just do that anyway.

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 Henri 1 · Mar 27, 2011 at 09:15 AM 0
Share

Thanks DaveA, will also give it a shot, the idea is to have a slowish, but not too slow beam, but you must be able to see it move with the eye.

avatar image DaveA · Apr 14, 2011 at 08:23 PM 0
Share

Ah like 'lasers' in so many Sci Fi shows, right? You'll probably need to scale it 'out' as it comes out of the gun, and 'in' as it hits the target.

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 objects collide and move each other? 2 Answers

basic cylinder with capsule collider 1 Answer

Collision with terrain 0 Answers

on trigger Enter 1 Answer

Dive collide 2 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