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 /
This question was closed Dec 04, 2013 at 06:19 AM by Julien-Lynge for the following reason:

Too subjective and argumentative

avatar image
0
Question by yogee · Dec 02, 2013 at 06:04 AM · particlesfire

how to spread a fire?

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

  • Sort: 
avatar image
6
Best Answer

Answer by Fornoreason1000 · Dec 04, 2013 at 06:08 AM

one way to do this .

Breifing

ou could ray cast around the start pos of the fire for flammable materials. then instantiate flames around the objects. then basically make it continue. by duplication.

Overview

  1. start the fire.

  2. Every few seconds preform ray-casting logic.

  3. using tags, you can determine how well something is flammable.

  4. if the target is flammable, get its collision bounds and instantiates some flames. based on the coordinates

  5. repeat the process a few times to build up.

  6. after a certain amount of fire, duplicate the start to the ray cast locations to allow it to spread further.

    Starting the fire

    ou can do this a number of ways. basically you want to setup a small particle system. containing the flames, you also want a prefab for the additional flames you are going to use to spread the fire. with the new shrunken particle system, it should not take long, ideally you can add a light with a red color. you can also make it grow from the start up to add some realism.

    Ray casting Logic

    irst of all you want to make sure ray casting doesn't happen each frame as this can be very slow! Instead in your script you want to add two variables MaxSpreadTime and MinSpreadTime. the when another variable is equal to a random number between those to you will start the spread logic.

The spread logic is quite simple, you simply use Sphere cast to check for anything around the the fire. then we can get the hit parameter.

Is it Flammable

here many way you can do this. one was is by using tags. you may have it already set up with things like Steel,Wood and Concrete. you can use the .hit parameter to find out if you got the tag or not. obviously thing like steel and concrete are not flammable but wood is, so you would check if hit.gameObject.tag is equal to the wooden tag.

another way is by component. you check make a new class called Flammability. this is useful for when there are gas tanks and explosives with steel containers. hit.gameObject.GetComponent suits this well. the beauty about this is that you can set how flammable something is, e.g wood is less flammable than petrol. you can set how long the flames will last for if you're talented.

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 Julien-Lynge · Dec 04, 2013 at 06:19 AM 2
Share

@yogee, You do realize the scope of what you're asking, right? This is not a question that has a "right" or even a "best" answer. @Fornoreason1000 is giving you the rough outline of the first 6 steps you could try, but this is quite literally the kind of thing people do thesis projects on.

I am marking @Fornoreason1000's answer as correct and closing this question, because what you want is impossible to describe in a few paragraphs. This is much better for the forums, where you can have an ongoing discussion and possibly collaboration with other Unity users.

avatar image
1

Answer by karljj1 · Dec 02, 2013 at 08:27 AM

http://u3d.as/content/farrugia-soft/dynamic-fire-system/3bE

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 yogee · Dec 03, 2013 at 04:16 AM 1
Share

i want to do myself pls. any idea

Follow this Question

Answers Answers and Comments

19 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

Related Questions

Fire particle problem. 1 Answer

Two Particle Systems 1 Answer

How can I get an object to recognize it should be on fire? 1 Answer

Particles - Moving a long 1 Answer

Fire outline shader 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