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 /
  • Help Room /
avatar image
0
Question by Xedroid · May 22, 2018 at 12:18 PM · collisionparticlesspell

How make long range spell effect with collisions (flame thrower effect)

I want to make a spell that will act like a flamethrower. The spell must collide with other objects to apply a fire effect and / or deal damage.

The visual effect itself can be obtained with particle system. The problem is how to get a collision even when the flame bends at different angles (when the player spins during the spell).

I need just idea how to do it or example. :)

Comment
Add comment · Show 4
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 ifurkend · May 22, 2018 at 02:58 PM 1
Share

While particle system does come with both collision-triggered event and subemitter module, they can be unreliable and performance taxing if you emit tons of flame particles to collide. Sanely speaking, just do a raycasting from your player character and use it to instantiate a “hit” particle effect.

avatar image Xedroid ifurkend · May 24, 2018 at 07:49 AM 0
Share

How achieve effect of bending fire in this approach? I will need to send raycast every "shot" or every second and I think it will be not accurate when character spin. But I can be wrong. Can you provide more information about your idea? Because maybe I misunderstood your idea.

avatar image Hellium · May 22, 2018 at 03:12 PM 0
Share

I would create a Collider (either a $$anonymous$$eshCollider if you have "complex" shape, or a simple capsule collider) you can attach to the entity responsible for your spell.

avatar image Xedroid Hellium · May 24, 2018 at 08:17 AM 0
Share

Sounds simple, but there is problem with collision when player spins and flame bends.

1 Reply

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

Answer by JusSumGuy · May 22, 2018 at 04:25 PM

Use a sphere gameobject and add the particle system/Trail renderer component to it. So then you can just use a sphere collider. You can use more than one sphere too at different sizes. For example the flame thrower can shoot out a few medium sized spheres with the particle system and a trail renderer attached. Then you can say onCollision(){ destroy medium spheres and instantiate a bunch of little spheres} to make it look like the fire is spreading in random directions. For the fire going around a player and bending effect, you can write a script for the spheres to circle around a target object at a random radius, to give it that chaotic fire look. With the particle system and trail renderer done correctly the player wont be able to see the actual sphere's and the collision system wont be very demanding. That's how I would approach it at least, hope this helps :).

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 Xedroid · May 24, 2018 at 07:39 AM 0
Share

Thanks it is helpful :)

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

190 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 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

Can I shoot a ray from a particle that hit a collider? 1 Answer

How do I make my particle system detect/mark a floor collision? 0 Answers

OnParticleCollision Instantiate Collision Normal 1 Answer

Can't find a way to add particle effects to a collision 2 Answers

Particle Collision between particles 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