Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
2
Question by LukaKotar · Nov 05, 2013 at 05:23 AM · velocityaddforceparticlesystemmove

Particle System - moving/adding force to the particles

Hi,

I have created a particle system effect, which only looks good until it is moved at a certain speed. As far as I understand, when simulation space is set to "World", it leaves the particles where they were emitted in the world space, and moves them from there. Instead of making the particles stay behind, I would rather like them to just sort of get pushed back while moving the source. Imagine a candle being carried around - the flame would never stay behind, it would just get slightly pushed in the opposite direction. Calling particleSystem.GetParticles() should return an array containing the particles, as type Particle, and I am concerned that moving them individually would harm my performance.

Question: Is there a way to add some force, to push the particles in the negative direction of where the object is moving? What would be the least framerate consuming way you can think of?

Thanks in advance!

Edit: I have tried rotating the particle system itself, and set the simulation space to local, but the problem here is the opposite to what I had before: the particle system rotates, and moves the existing particles, rather than having them stay behind. I tried rotating when emission space was set to world, and got the same result. Is there a way to change the direction the particle system emits new particles to, while keeping the existing ones in place?

Edit #2: Done a bit more googling, and found out that the previous system had a way of changing the local velocity through code. In the new particle system (shuriken), it does not appear this is possible. All I see is 'Velocity Over Lifetime' in the inspector, which apparently cannot be accessed through code either. Or is it?

Comment
Add comment · Show 8
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 trs9556 · Nov 06, 2013 at 02:53 AM 0
Share

It might give you more of a "fake" look but I had some rotation problems in the past with particle effects. The solution I used is I parented the particle system onto an empty game object and then changed the rotation of the parent (empty game object) rather than the particle system itself. Perhaps that can work for you?

avatar image LukaKotar · Nov 06, 2013 at 03:12 AM 0
Share

Thank you for the comment. I have just tried doing that, but having the simulation space set to local, it doesn't appear to be any different than rotating the particle system itself. I explained why I don't want to use the world space in the question.

avatar image trs9556 · Nov 06, 2013 at 03:18 AM 0
Share

Oh I see what you mean now. I couldn't visualize it at first. I have the same problem, it rotates the already existing particles and looks completely fake. Unfortunately I have yet to solve this myself. I kind of just accepted it. Coincidentally I just thought of a different solution. Ins$$anonymous$$d of rotating/parenting the system what if you added a follow script. Forced it to just follow the game object that is moving. The effect would not rotate but because it's moving the particles should appear realistic?

avatar image LukaKotar · Nov 06, 2013 at 03:26 AM 0
Share

If I move the particle system when emission space is set to local, it will just move everything as one, and I fail to see how that would make it more realistic. Remember, if I use world space, the particles would stay too far away from the source emitter, if it is moving fast. The only way I can currently think of, is setting the velocity or local velocity, which is not possible in the new particle system. (Edited the question to add this bit of information)

avatar image trs9556 · Nov 06, 2013 at 03:43 AM 0
Share

So I did some test and it appears you can use the Legacy particle system to achieve what you want. You can freely move/rotate the particle system and it only effects the NEWLY emitted particles. Any particle that is already emitted isn't effected. Give that system a try.

Show more comments

1 Reply

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

Answer by LukaKotar · Nov 11, 2013 at 11:03 PM

Looks like I overlooked a field called 'Inherit Velocity' in the Particle System component. It explains what it does as you hover over it with the mouse: "Applies the current directional velocity of the Transform to newly emitted particles." This means that when I move my particle system object, the defined amount of force will push the newly emitted particles, effectively making them stay less far behind, or further behind (depends if the number is positive or negative). 0.7 seems to be a great value for my desired effect.

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

16 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

Related Questions

Can't move when fall from high 1 Answer

different beetween transform.translat and rigidbody.addforce? 1 Answer

My object can't move left and right but only jump? 1 Answer

How to slow or stop an object with no gravity 2 Answers

How to slide when i change direction of my 2dcharacter 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