Particle System Rotates with the arm, how do I stop that?

So Ive animated my character to simply run, and added a particle system (ellipsoid, animator, renderer) to the hands of my character, and Ive set the particles to go upwards (Local Velocity = 0.35) and everything looks good, but once I run the game, the particles turn with the hand.

Ive put the particle system inside the bones of the character, so that they will move while the player does its actions, but when the arm turns, so does the particle, but I want the particle to go upwards ONLY, not at an angle.

So the picture on the left shows his right arm is turning to run, but also the particles have turned, but i need it to be always going upwards, not on the angle.

Anyone know how to achieve this?

(Ive tried world velocity, and every other kind of way to make the particles go up, but its all the same, ticking Simulate World Particle works but then the particles give a huge trail which I Do not want)

411041--14242--$123.JPG

My guess is currently the particle system is attached to the hands. This will mean the local Up changes when the hands moved. Which is what you are experiecing.

To stop this id create an empty GameObject. Attach this to the hand. Attach the Particle System to the Game object.

Then in the Update()

Make sure the GameObject.rotation = world.UP

Note quite sure of the code…

Thanks for the quick reply, So i was thinking thats a great algorthm that you’ve set, and ill give it a try soon. You think local rotation would work? I know theres some kind of code that makes the rotation go up like you mentioned, but i just cant put my finger on it…

transform.Rotate(Vector3.up);

didnt seem to work.

Well after a nice long look here: Unity - Scripting API: Transform I found a solution…

This will make the transform look at any direction you give it (i made it look at an empty game object above the player).

Thanks for the idea psyclone

Once you have the rotation working (you could just set particleThing.transform.rotation = Quaternion.identity), you might also experiment with the emitter’s Simulate In World Space option (or whatever it’s called; something like that.)

NP. I was trying to avoid the empty GameObject above the player thing… but if it work for you good.

I know this is an old post, but there is another way to constrain rotation. Just attach this component to the object you want to constrain its rotation

This was added with version 2018.1

1 Like

Amazing!