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
3
Question by madeFromCode · Apr 08, 2011 at 10:23 PM · particleemitterparticleemitter

Can you make a particle emitter that emits inwards?

I'd like to make a particle emitter that will spawn particles at a given radius and have those particles travel in to the center. The effect should be that the particles are being sucked in to a central point, like you would see on a portal. I've been playing around with the particle emitters and I can't seem to find a good way to make this happen. Anyone know how?

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

4 Replies

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

Answer by Marnix · Apr 08, 2011 at 10:43 PM

Default particle emitters use only one emitter point. You want to use a complete sphere as emitter point. This is very well possible to create, but doing this in Unity will need some scripting. Maybe you could inherit from the ParticleEmitter class?

There is also this piece of documentation about Ellipsoid Particle Emitters. But still, I think it will require some scripting, because not every particle emitted from the emitter has the same velocity. And also the force in the particle animator is different for each particle.

So concluding: It requires some inheritance or reuse of the ParticleEmitter and ParticleAnimator class. When a new particle has to be created:

  1. Determine the place on the sphere
  2. Determine the velocity (starting speed)
  3. Determine the force for this particle in the Animator
  4. Determine the energy for this particle (time until it will reach the end)


Alternative (easier?) solution
While creating this answer, I came at some other pages in unity as well.

  1. Create a Mesh Particle Emitter with a Sphere as mesh.
  2. Create a Particle Collider inside your vortex
  3. Let your particles die when they come into the particle collider.

The only thing is: what is the starting velocity? What is the force? So still, maybe some coding is needed to get this going in your way. Or check google for some unity particle effects. I'm pretty sure that someone has already done this.

Update
Come to think of it, the ellipsoid particle emitters have local velocity, so you could use that probably.

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 Owen-Reynolds · Apr 10, 2011 at 06:17 PM 0
Share

re: local velocity. That's with respect to the emitter's rotation, so good for ai$$anonymous$$g a spray, but doesn't consider particle spawn point.

avatar image
3

Answer by Owen-Reynolds · Apr 08, 2011 at 11:34 PM

For a sphere, set minEmmiterRange to around 0.9 (90%) and TangentVelocity.Z to negative. Adjust Energy so they die before they cross the center and move outwards again.

Only works if the emitter is round (MinEmitterRange only properly sets them on the edge if XYZ are all the same.)

Tangent velocity clearly has something to do with "speed based on spawn position," but darned if I can figure it out.

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
avatar image
0

Answer by Eric5h5 · Apr 08, 2011 at 10:47 PM

Use a mesh particle emitter and have the min/max normal velocities be negative. (Either that or have the surface normals of the mesh pointing inwards.)

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 DaveA · Apr 09, 2011 at 04:33 AM 0
Share

Probably having an acceleration (negative?) would help the effect as things accelerate when falling inward

avatar image
0

Answer by Bunny83 · Apr 09, 2011 at 03:17 AM

You can also use any kind of ParticleEmitter and use the .particles array to get the current particles and even changed them or add new particles. Just create a new array and write it back to .particles. Take a look at the Particle class which represents a single particle.

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

No one has followed this question yet.

Related Questions

Particle emitter to emit "one-shot" on specific occasions 5 Answers

Particle Emitter Toggle ON/OFF 1 Answer

Particle emitter object destroys itself 2 Answers

Particle emitter works intermittently 0 Answers

Inverted Particle Emitter 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