- Home /
[SOLVED] Particle system follows root bone of actual parent bone.
Hello there,
I'm facing a problem and I really won't know where the issue is. I have two skinned characters, Mech3 and Mech4. They are different models but they have the same rigging structure (same number of bones, same names, etc.).
I made a script to control the rotation of the bone Spine1 for a first person controller with mouse movement.
Then I made a flamethrower with a wolrd simulated particle system for the fire effect. When I instantiate the particle System on the Spine1 of Mech3 all is good and well, Particle system emitter rotates normally with the rotation of Spine1.
When I do the same thing with Mech4 the emitter doesn't follow Spine1 but HIPS (and consequently doesn't follow the torso rotation of the character).
Here is an image of the two hierarchies during play mode:
Setting up particle systems to Local space simulation seems to settle the issue, but this is clearly not what I'm looking for.
I also made the particle system print their parent after instancing, and the parents are actually correct (as you can see from the image above).
I even tried to unparent and reparent the particle system to the weapon at start, but it didn't make any difference.
It looks like a bug to me but.... Am I missing something?
PS: here is a link to the web player scene so you can see the behaviour. Try Equipping the flame thrower on every mech. Mech 3 behaves correctly, Mech 4 have the issue I'm talking about.
Answer by $$anonymous$$ · Nov 09, 2014 at 02:19 PM
I Finally solved this with a workaround (still think it's a bug within unity that caused this).
I made the LookAtTarget GO (which was used to rotate the torso according to where the mouse was pointing) as the parent of all the weapons, then I made a script to force the object to follow the transform of the Spine1 bone in the rig.
Apparently the issue lays somewhere inside the skeleton, but it doesn't have to do with joint orientation or other stuff.
Answer by _FDR_ · Nov 08, 2014 at 03:17 PM
Try to make a prefab of Mech3 and name if whatever you want or name it Mech4 and attach the script to it. That may work. You can make the prefab by clicking on create button in project window then select prefab & drag your Mech3 object from heirarchy window into the empty white prefab.
Too bad I can't do that because $$anonymous$$ech3 and $$anonymous$$ech 4 are actually two different models. I put a link to the webplayer in the answer.
Answer by TheShadyColombian · Nov 08, 2014 at 03:14 PM
set the simulation space to world (instead of local)
Then I made a flamethrower with a wolrd simulated particle system for the fire effect.
The particle system is set to world space already. Setting it to local space does actually work as intended, but I need it simulated in world space.
did you try world space, but set the "inherit velocity" to a really high number? that might work
and, BTW i have done this too and not only is it hard, it will also lag out your game. i suggest using two sprites that are perpendicular to each other
Sorry, maybe I wasn't clear enough: I need the particles to behave as they were simulate in world space (hence I set it to world space), because being the weapon a flamethrower, flame should propagare in the world even if the character is moving around (and not sticking to the weapon).
If I set the particle system to world the particle system DOESN'T follow the weapon (or the Spine1 the weapon is attached to) but it follows the HIPS bone trasforms. Still the simulation is correct, it just doesn't follow the correct parent (which is HardpointLeftArm/HardpointRightArm).
By setting the simulation in world space and setting inherit velocity at a really high value I would only get the effect I would by using local space simulation, which is not the case I need. Further more, as I already said in my question, doesn't actually present weird behaviours (it follows the correct parent).
To schematize the issue even more:
Simulation = Local : the particle system moves and orients with the weapon
Simulation = World : the particle system moves and orients with the hips (I don't want this)
If i use the same weapon on another character with te same hierarchy structure (not the same entities) the particle system behaves correctly.
Weird that in 2020, I am also having this exact problem.
Bah.
That is not a game actually, we are going to sell those assets (we will release it soon) and we are building a "simple" test scene to show how the assets should work together. I'd like to make it so the setup doesn't show problems, and this is giving me headhaches because apparently those two setups are identical.
I can't do what you suggested because bones have different size between the two mechs, and the number of bones is not the same (different amount of toes for example).
Your answer
![](https://koobas.hobune.stream/wayback/20220613171004im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to inherit rotation from parent object with Shuriken Particle System? 0 Answers
Particle system turns on when player gets close. 1 Answer
ellipsoidparticleemitter 1 Answer
Following another object's position/rotation like parent/child relationship? 4 Answers
Find a specific object even though there are many of them. 2 Answers