Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 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 /
  • Help Room /
avatar image
2
Question by boinst2 · Aug 03, 2014 at 02:20 PM · particle-system

How can I rotate a particle effect?

I'm building a project based on the space shooter tutorial. In part three of the tutorial (about 8 minutes in to the video), we use a particle system to add an engine flare effect. The problem I'm trying to solve is that when I rotate the ship, I cannot get the engine flare to rotate with it. Even changing the Transform of the game objects doesn't seem to affect this. you can see the problem in my screen cap. The engine flare is pointing straight up and down despite the rotation of the Player game object. How can I rotate this particle effect?

alt text

engine.png (244.3 kB)
Comment
Add comment · Show 5
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 meat5000 ♦ · Aug 03, 2014 at 01:01 PM 1
Share

(Shuriken) Look at the component itself in the editor. You will see a sub-section for this.

avatar image ThreeLizardGames · Apr 04, 2015 at 03:33 AM 0
Share

Necro-ing and ancient thread here, but I'm working with the space shooter tutorial in Unity 5 and am running into the same issue.

The thruster particles are children to the ship, and their position rotated relative to the ship is correct. However the rotation of the particles about their own origin does not change when the ship's rotation changes. They always face at 180 degrees.

I tried changing to world, but that doesn't solve it. Any ideas?

avatar image ThreeLizardGames · Apr 04, 2015 at 03:34 AM 0
Share

alt text

Here's a screenshot for reference... Appears to be the same issue as posted above.

ship.png (197.4 kB)
avatar image Owen-Reynolds · Apr 04, 2015 at 03:51 PM 0
Share

The "answer" (which is wrong) is a bit silly since $$anonymous$$eat5's 1st comment is pretty much correct. If you're using particle systems, you first should go through all the settings, to $$anonymous$$ch yourself. It's like reading the manual.

One of them changes the "facing" of the billboards (it's in Renderer.) But, esp. for rocket jets, there are a bunch more settings that should be adjusted, which are obvious after you're experimented with them once.

avatar image Vickylance · Jul 09, 2015 at 08:26 PM 0
Share

@ThreeLizardGames Did you got it working?

6 Replies

· Add your reply
  • Sort: 
avatar image
13

Answer by Stamblew · Nov 23, 2018 at 09:08 PM

I know this question is old, but for those who are still looking for a solution, what you can do is:

  1. Go to your particle Renderer module

  2. Change the Render Mode option to Billboard

  3. Change the Render Alignment option to Local

  4. Now you can rotate your particles using the transform of the object.

PS.: I tested this on Unity 2018.1

alt text


screenshot.png (48.9 kB)
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 bificommander · Mar 06, 2019 at 10:54 AM 0
Share

This works great. If you're actually using the space tutorial jet asset, don't forget to rotate the particle system by 90 degrees in the x direction to get it right.

avatar image DungDajHjep · Mar 29 at 12:10 PM 0
Share

Thanks you ! You save me <3

avatar image
4

Answer by harrisjed · Oct 26, 2015 at 11:56 AM

I faced the same problem while working with the Space Tutorial. What worked for me is setting for both part_jet_flare and part_jet_core particle systems the start rotation in FixedUpdate() to be the same as the player object - i used two player objects with the second one to be inverted and I instantiated them in the game controller script.

 pSys.startRotation = gameObject.transform.rotation.eulerAngles.y * Mathf.Deg2Rad;

Also check this answer too.


space-shooter.jpg (110.7 kB)
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 josefnpat2 · Nov 11, 2016 at 06:38 PM 0
Share

This solution worked for me. I attached the part_jet_flare to public GameObject thrust_flare;.

Then in FixedUpdate() I added:

thrust_flare.particleSystem.startRotation = gameObject.transform.rotation.eulerAngles.y * $$anonymous$$athf.Deg2Rad;

I note this because pSys.startRotation doesn't clarify that it's the particleSystem object type ins$$anonymous$$d of the GameObject type.

avatar image Rodolfo-Rubens · May 06, 2017 at 02:32 AM 0
Share

Thanks a lot! In my use case I just needed to switch to pSys.startRotationY everytime I called play on my non-looping particle system.

avatar image
3

Answer by Owen-Reynolds · Aug 03, 2014 at 04:21 PM

Are we only giving hints now? Fine with me: (partial spoiler):

Like many other things, particles can use xyz world space, which means they ignore facing and always use x=right ... . This is good for a rolling, flaming log, where you always want +y to be up, for rising flame and smoke.

Or they can use localSpace, which means they use the xyz of their transform.

The setting has sort of an odd name, but it uses the words "space", "local" and "global."

(spoiler alert) For Lady Stark there's dead, and there's dead.

also:

Simulation Space

[edit] Whoops! My answer is completely wrong. I was getting mixed up with the older particle system.

Depending on which shape you select, the particles should always fire the way the transform is pointing. Sphere is always 360, hemisphere is always within 90 degrees of forwards, cone always aims the way the transform goes.

It's very difficult to make a particleSystem that doesn't spin when you do (except for a sphere, for obvious reasons.)

SimulationSpace is merely whether old particles track your motion.

Now, down in ForceOverLifeTime and VelocityOverLifetime, the settings for Local/Global really do pick which coord system to use. But not many people use those. For example, "thruster flames" are easy to make with a tight cone and sizeOverTime.

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 boinst2 · Aug 04, 2014 at 02:19 AM 0
Share

Beauty, thanks for the (cryptic) answer, I'll try that this evening. Also thanks for the extra context you provided, that's a big help for my understanding of how the particle system works.

avatar image boinst2 · Aug 04, 2014 at 08:02 AM 0
Share

Hmmm there's a property called "Simulation Space" but it doesn't seem to change anything. The rotation of the graphic doesn't change.

alt text

sim-space.png (43.2 kB)
avatar image
2

Answer by animator_84 · Jun 02, 2015 at 11:06 AM

use a quad/plane as under Render/ Rendermode/ Mesh. Then choose your particle material. Then You'll be able to rotate your particle in 3d space.

Comment
Add comment · Show 4 · 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 Vickylance · Jul 09, 2015 at 08:25 PM 0
Share

@animator_84 That didnt work :(

avatar image Owen-Reynolds · Jul 09, 2015 at 09:28 PM 0
Share

The question is sort of poorly worded. I think http://answers.unity3d.com/questions/219565/how-to-orient-particles-to-direction-they-are-movi.html is what the original poster meant to ask, and has what I think is the correct answer.

animator84: If you leave the default PE, rotation isn't an issue, since it's round. Anyone having this problem has already selected a different material (like the spaceship flames.)

avatar image Karishi · Feb 05, 2017 at 03:00 AM 1
Share

This solution works.

If you're using the Space Shooter build, under the Particle System for the part_jet_flare and part_jet_core, look under Renderer and the first item is Render $$anonymous$$ode. Change it from Billboard to $$anonymous$$esh (and use the circle select tool to pick Plane - the default of Cube looks semi-decent because it's a glowing line co$$anonymous$$g from the back of your ship, but if you look closely you see it's doing this because it's projecting the effect both forward and backwards). You'll want to resize the elements - this can be done under Start Size, which is not in the Renderer section but above in the element's basic settings. I set $$anonymous$$e to .1 / .08 for the flare, and .1 / .2 for the core.

As animator_84 said, the mesh will then turn with you.

avatar image ZatriX_ZA · May 01, 2017 at 01:38 PM 0
Share

Just another little addition here to $$anonymous$$arishi's answer - when scaling, make sure to change Scaling $$anonymous$$ode for the Particle System itself from 'shape' to 'hierarchy'.

avatar image
0

Answer by kaleidosgu · Nov 21, 2017 at 11:00 AM

Thanks for all the answers. I update one solution.

 Vector3 vecDir = vecPosEnd - vecPosStart;
 ParticleSystem.MainModule mainMod = yourParticleSys.mainMod;
 mainMod.startRotation = Mathf.Atan2(-vecDir.y, vecDir.x) ;

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
  • 1
  • 2
  • ›

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

17 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

Related Questions

How is this effect created in vfx graph 0 Answers

Unity5.0 Canvas and Particle System 2 Answers

Problem with particles in World simulation space while rotating bones at LateUpdate 0 Answers

[Unity 5.5] How can I set the properties for the ParticleSystem.main by script? 0 Answers

changing the radius of a particle system with unity script 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