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 salex100m · Jan 02, 2017 at 03:19 AM · particlesystemparticle

One particular particle. Off/on control?

Is there a way to turn a particle (ONE particle) that is emitted and turn it off (or do other things to it) without messing with the particle system. I don't want to enable/disable the game object that the system is attached to. And .stop() and .play() wont help with the already emitted particle. I want to stop one particular particle in it's tracks.

How?

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

Answer by tanoshimi · Jan 02, 2017 at 05:40 PM

No. A particle system is a system - a single entity. If you want to treat its particles as gameobjects that can be separately identified and rendered them you need to create them as such.

Comment
Add comment · Show 7 · 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 salex100m · Jan 02, 2017 at 07:29 PM 0
Share

If I wanted to do that, I would've done that. I'm using the particle system for various reasons beyond the scope of this question. A particle is an object just like any other. There is obviously a way to access it and control its parameters. After all the Particle System creates and pools these particle objects at some point.

avatar image tanoshimi salex100m · Jan 02, 2017 at 07:40 PM 0
Share

A single particle is not a gameobject. It has no transform component, which is the defining feature of gameobjects. And nor can it have components attached to it. It's basically just a quad in a dynamic mesh managed by the particle system of which it is part.

avatar image salex100m tanoshimi · Jan 02, 2017 at 08:20 PM 0
Share

You are misunderstanding the difference between a GamObject and an object (lowercase). An object (in the traditional sense) is just an encapsulated collection of things (parameters, variables, classes, whatever).

A GameObject has a transform and I think inherits from monobehavior. A particle is some object that I have no idea what it is. I imagine it is some optimzed class that exist outside monobehavior and GameObject.

Clearly a particle is an object. I need to know how to access it. I don't what parameters it might have, but it probably does have the basic transform-y structs attached to it, pos, rotation, etc.

Either way, I don't care. I just want to access it and play around with it directly.

Show more comments
avatar image RobAnthem · Jan 02, 2017 at 07:46 PM 1
Share

Exactly, I had to convince one of my project members of this. It is simply a SINGLE gameObject that has a lot of ability to act like multiple objects. However, you can run a "$$anonymous$$Ill" event in the particle to destroy individual particles... but if you put a collision trigger on the particles and ANY particle collides, it will run the event, if that event is Destroy(gameObject), every particle and the emitter will be destroyed.

avatar image salex100m RobAnthem · Jan 02, 2017 at 08:06 PM 0
Share

Rob are you replying to me? How do you execute that "$$anonymous$$ill" event you spoke of. Sounds like exactly what I need to do.

Also for the record, my particles are not colliders. All I need to do is make the particle (a stretched billboard) disappear from the system.

avatar image tanoshimi salex100m · Jan 02, 2017 at 08:29 PM 0
Share

Particles are automatically killed if they drop below the kill speed after a collision (docs). But that won't help you stop the particle or do other things with it - it just removes it from the particle system's array.

avatar image
0

Answer by ifurkend · Jan 02, 2017 at 06:03 AM

I am not entirely sure what kind of result you want. But if you want to halt the movement of the emitted particles, you can give "ParticleSystem.MainModule.simulationSpeed" "zero" value which affects the whole particle system, not just ONE emitted particle.

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 salex100m · Jan 02, 2017 at 05:28 PM 0
Share

I'm using particle system to simulate a bullet shot. I want the bullet to stop at time = t_impact, which may be different than time = t_travelLifeTime for example.

I am going to try particleSystem.Clear(). However that obviously clears all particles. I was wondering if there is a more definitive control over particular particles. Suppose I launch 3 particles and only 1 hits for example.

note: Assume I know (using raycast) which of the three is the hitting particle.

avatar image CarnivorousHam salex100m · Jan 02, 2017 at 05:31 PM 0
Share

I personally wouldn't recommend using a particle as a projectile.. What you could do is create an empty object, treat that as the bullet and add a particle system to it? Or give it a sprite component that uses the texture from the particle system?

Best of luck!

avatar image salex100m CarnivorousHam · Jan 02, 2017 at 07:31 PM 0
Share

That's what I'm doing. The particle is the bullet animation if you will that exist on the actual bullet object (which is static). One the bullet detects impact I want to stop the particle from continuing on its merry way.

Right now, I'm using .clear() and it works fine. However I'd rather have more individualized control ins$$anonymous$$d of over the entire particle list.

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

65 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

Related Questions

Did the behavior of gravity of particleSystem ever changed? 0 Answers

[Tank Game Tutorial] Particles Only Appear While Turning 2 Answers

Teleporting old particle system 0 Answers

Start/Stop a Particle System 2 Answers

ParticleSystem at Photon Not working! 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