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 chanfort · Jan 28, 2015 at 12:46 AM · particlesparticlesystem

Forcing particle to follow GameObject

I am interested if it is possible to force individual particle, which is inside non moving particle system to follow gameObject?

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 DanSuperGP · Jan 28, 2015 at 01:10 AM

Yeah, you can do all sorts of manipulations on your particles with GetParticles and Set Particles.

http://docs.unity3d.com/ScriptReference/ParticleSystem.html

In this case... you would want to get the list of particles with GetParticles... http://docs.unity3d.com/ScriptReference/ParticleSystem.GetParticles.html

Then manipulate the particles in the list that you want to manipulate... http://docs.unity3d.com/ScriptReference/ParticleSystem.Particle.html

Then set the particles afterwards. http://docs.unity3d.com/ScriptReference/ParticleSystem.SetParticles.html

The way it works is a little odd, look at this answer for help with the way to do it.

http://answers.unity3d.com/questions/548164/shuriken-accessing-particle-array-created-in-inspe.html

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 chanfort · Jan 28, 2015 at 01:35 AM 0
Share

Wow, thanks for such fast answers. I am actually thinking about possibility to use particles ins$$anonymous$$d of individual sprites for thousands of game objects, which are my soldiers in RTS game. I was wondering if GetParticles and SetParticles calls on almost every update for thousands of particles would be not very expensive? In other words, does anyone know approximate numbers of particles when using GetParticles and SetParticles starts to affect performance?

avatar image DanSuperGP · Jan 28, 2015 at 05:17 PM 0
Share

I think it would be quite expensive depending on what you are doing with the particles in each update step. This is something people use to make their particle effects more visually appealing, like adding vortexes and such... I don't think it's really meant to replace game objects.

avatar image
0

Answer by Pflobus · Jan 28, 2015 at 01:02 AM

I don't think it is...I mean you can put the system with the GameObject, in the heirarchy, but I'm not sure. Maybe you could make a cone with a really focused radium pointed in one direction, and have it spew only one particle, and have a long duration, whereas then you have another particle system which is your base system which is stationary and spews like particles to the one that follows the gameObject. Or, you could make one particle system, with just 1 particle, keep it stationary, then put it in the hierarchy to follow the gameObject, and then a separate system, that is stationary, but looks alike. Or some scripting magic, but I'm pretty sure that's about it. But...Google (or Yahoo or Bing (Search Engine Equality)) is (are) your friend(s).

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.

Follow this Question

Answers Answers and Comments

20 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

Related Questions

Particle system drifting to a dynamic point 0 Answers

particle systems' physics heavily depends on framerate?? 1 Answer

Change Size over Lifetime for Particle System? 1 Answer

Particle System Emission Rate Scriptt 0 Answers

Scale individual particle size while system is paused. 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